<p>Related project proposal: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="605912833" data-permission-text="Title is private" data-url="https://github.com/bisq-network/projects/issues/30" data-hovercard-type="issue" data-hovercard-url="/bisq-network/projects/issues/30/hovercard" href="https://github.com/bisq-network/projects/issues/30">bisq-network/projects#30</a></p>
<p>This example PR is meant to be read commit by commit.</p>
<p>It's a simple refactor of <code>WalletConfig</code> focusing on moving code. Moving code is the simplest (and least interesting) form of refactoring, but while doing it (similarly to shuffling puzzle pieces while solving a puzzle) you come up with more interesting refactorings, though it's a time-intensive process.</p>
<p>There are a few quirks here that are still to be ironed out:</p>
<ul>
<li>Naming of <code>low.PeerGroup</code> clashes with BitcoinJ's PeerGroup. Might come up with something better;</li>
<li>The whole <code>PeerGroup extends PeerGroupProxy</code> scheme has its upsides, but a few downsides too. Might come up with something better;</li>
<li><code>PeerGroupProxy</code> name clashes with <code>Socks5Proxy</code> and the like; naming isn't worked out in general;</li>
<li>Part of the logic moved from <code>WalletConfig</code> to <code>low.PeerGroup</code> in this example might actually do better left in WalletConfig, which will require dissecting it further.</li>
</ul>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/4269'>https://github.com/bisq-network/bisq/pull/4269</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Clone and substitute BitcoinJ's PeerGroup</li>
  <li>Move some PeerGroup creation logic to btc.low</li>
  <li>Reduce API access</li>
  <li>Correction</li>
  <li>Isolate more logic</li>
  <li>Move to low.PeerGroup</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4269/files#diff-627452dbf381fa062b4e21ac4e6a89a6">core/src/main/java/bisq/core/btc/low/PeerGroup.java</a>
    (98)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4269/files#diff-3c0bc0b090520e93d437cb3cbb31271c">core/src/main/java/bisq/core/btc/low/PeerGroupProxy.java</a>
    (111)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4269/files#diff-6b1197563dfc718757eb0461395be1d3">core/src/main/java/bisq/core/btc/setup/WalletConfig.java</a>
    (46)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4269/files#diff-2aef55dfcdfabcdf98c19ede9971e3bd">core/src/main/java/bisq/core/btc/setup/WalletsSetup.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4269/files#diff-d5c3e76629f3c491190b58b1d84803bc">core/src/main/java/bisq/core/btc/wallet/TxBroadcaster.java</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/4269.patch'>https://github.com/bisq-network/bisq/pull/4269.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/4269.diff'>https://github.com/bisq-network/bisq/pull/4269.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4269">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNSHAP3WELZZCYOOQX3RSFMVDANCNFSM4NEG6A7A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNS7Q2C4AA4S6REPG2LRSFMVDA5CNFSM4NEG6A7KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JHZREOQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4269",
"url": "https://github.com/bisq-network/bisq/pull/4269",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>