[bisq-network/bisq] WIP PeerGroup-related logic refactor (#4292)

dmos62 notifications at github.com
Thu Jun 11 12:35:55 UTC 2020


Half finished PeerGroup-related logic refactor. Part of project: https://github.com/bisq-network/projects/issues/30
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/4292

-- 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
  * Clarify logic; no algo changes
  * Using a local BTC node implies not using a proxy
  * Remove dead code
  * Fix indent and remove some comments
  * Describe algorithm's requirements
  * Refactor an if-else into two methods
  * Move getting ClientConnectionManager to new method
  * Extract some peer discovery related logic
  * Move some higher-level logic back to WalletConfig
  * Rename a method
  * Move general PeerGroup creation method back
  * Adjust moved method's accesses
  * Extract more WalletConfig.startUp logic to methods
  * Extract some WalletConfig start-stop logic
  * Uncouple shutdown hook from PeerGroup start
  * Collapse two download listener creation branches
  * Rename downloadListener to downloadTracker
  * Remove dead code (blockingStartup is always false)
  * Improve some formatting
  * Move some of startup logic to low.PeerGroup
  * Reduce protected access to private
  * Have startWithDownloadTracker mirror startAsync
  * add a TODO
  * Move setPeerNodes* methods next to each other
  * Clarify phrasing in comment
  * Add a TODO note
  * Clarify method function
  * Move a method from WalletsSetup to WalletConfig
  * Clarify method's name; have it match with sibling
  * Move peer sourcing logic to its own method
  * Make WalletsSetup peer sourcing logic static
  * Have this be called for all branches
  * Give configPeerNodes more specific name
  * Move thread-sensitive exception logic from method
  * Move method to appropriate section of the file
  * Add logger
  * Make BtcNetworkConfig's only method static
  * Move BtcNetworkConfig.proposePeers to WalletConfig
  * Move method (again) next to tightly coupled method
  * Add some TODO comments

-- File Changes --

    A core/src/main/java/bisq/core/btc/low/PeerGroup.java (146)
    A core/src/main/java/bisq/core/btc/low/PeerGroupProxy.java (111)
    D core/src/main/java/bisq/core/btc/nodes/BtcNetworkConfig.java (78)
    M core/src/main/java/bisq/core/btc/nodes/BtcNodeConverter.java (2)
    M core/src/main/java/bisq/core/btc/setup/WalletConfig.java (210)
    M core/src/main/java/bisq/core/btc/setup/WalletsSetup.java (148)
    M core/src/main/java/bisq/core/btc/wallet/TxBroadcaster.java (2)
    R core/src/test/java/bisq/core/btc/setup/WalletsSetupTest.java (33)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/4292.patch
https://github.com/bisq-network/bisq/pull/4292.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/4292
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200611/d52fb9a4/attachment.html>


More information about the bisq-github mailing list