[bisq-network/bisq] WIP Bitcoinj usage refactor example (#4269)
dmos62
notifications at github.com
Mon May 18 16:09:53 UTC 2020
Related project proposal: https://github.com/bisq-network/projects/issues/30
This example PR is meant to be read commit by commit.
It's a simple refactor of `WalletConfig` 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.
There are a few quirks here that are still to be ironed out:
- Naming of `low.PeerGroup` clashes with BitcoinJ's PeerGroup. Might come up with something better;
- The whole `PeerGroup extends PeerGroupProxy` scheme has its upsides, but a few downsides too. Might come up with something better;
- `PeerGroupProxy` name clashes with `Socks5Proxy` and the like; naming isn't worked out in general;
- Part of the logic moved from `WalletConfig` to `low.PeerGroup` in this example might actually do better left in WalletConfig, which will require dissecting it further.
You can view, comment on, or merge this pull request online at:
https://github.com/bisq-network/bisq/pull/4269
-- Commit Summary --
* Clone and substitute BitcoinJ's PeerGroup
* Move some PeerGroup creation logic to btc.low
* Reduce API access
* Correction
* Isolate more logic
* Move to low.PeerGroup
-- File Changes --
A core/src/main/java/bisq/core/btc/low/PeerGroup.java (98)
A core/src/main/java/bisq/core/btc/low/PeerGroupProxy.java (111)
M core/src/main/java/bisq/core/btc/setup/WalletConfig.java (46)
M core/src/main/java/bisq/core/btc/setup/WalletsSetup.java (2)
M core/src/main/java/bisq/core/btc/wallet/TxBroadcaster.java (2)
-- Patch Links --
https://github.com/bisq-network/bisq/pull/4269.patch
https://github.com/bisq-network/bisq/pull/4269.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4269
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200518/e2bae5c0/attachment.html>
More information about the bisq-github
mailing list