[bisq-network/bisq] Remove address prefix (#4610)
chimp1984
notifications at github.com
Thu Oct 8 23:24:33 UTC 2020
Remove address prefix in case the peer has updated vesion as well.
Processes all mailbox messages in a thread. (1000 msgs takes about 1 sec).
Replaces #4609
You can view, comment on, or merge this pull request online at:
https://github.com/bisq-network/bisq/pull/4610
-- Commit Summary --
* Add NO_ADDRESS_PRE_FIX capability.
* Cleanups
* Make onRemoved default in interface
* Add methods for getting peers capabilities
* Remove verification for address prefix
* Clear capabilitiesListeners at shutdown
* Refactor: move SupportedCapabilitiesMessage handling code out to a method
* Use only node address for equals and hashcode
* Pass supportedCapabilities to PeerManager. Not further processed yet, will be done in next commits
* Use getSingleThreadListeningExecutor, cleanups
* Apply code inspection suggestions
* Add findPeersCapabilities method
* Add getDateAsLong method, add setter for capabilities
* Add findPeersCapabilities method
* Replace persistedPeers with peerList
* Use getPersistedPeers for peerList.getList() calls
* Update common/src/main/java/bisq/common/app/Capability.java
* Update p2p/src/main/java/bisq/network/p2p/network/Connection.java
* Fix incorrect handling of decryptedEntries size
* Refactor: Return early
* Refactor: Rearrange code, remove unused methods, renamings (no functional change)
* Refactor: Rename method
* Use connection.getPeersNodeAddressOptional().isPresent() instead of connection.hasPeersNodeAddress() which does the same internally
* Fix tests
* Use a hashset instead of list to avoid duplicates. Filter out my own node from persisted peers.
* Decrease failedConnectionAttempts onConnection
* Fix incorrect collection used in == 1 check
* Add isPresent check
* Do not log size as we don't want to call potentially expensive toProtoMessage method
* Copy peers in a new hashset to avoid concurrent modification exc at serialisation
* Dont reassign param
* Use custom class MailboxItem instead of Tuple
* Apply code review suggestions
* When updating the capability from a reported peer we check if the reported one has higher capabilities, otherwise we ignore it.
* Apply codacy suggestions
-- File Changes --
M common/src/main/java/bisq/common/app/Capabilities.java (18)
M common/src/main/java/bisq/common/app/Capability.java (3)
M common/src/test/java/bisq/common/app/CapabilitiesTest.java (42)
M core/src/main/java/bisq/core/dao/governance/blindvote/network/RepublishGovernanceDataHandler.java (2)
M core/src/main/java/bisq/core/dao/node/lite/network/LiteNodeNetworkService.java (2)
M core/src/main/java/bisq/core/setup/CoreNetworkCapabilities.java (3)
M core/src/main/java/bisq/core/support/dispute/agent/DisputeAgentManager.java (2)
M core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java (5)
M monitor/src/main/java/bisq/monitor/metric/P2PNetworkLoad.java (2)
M p2p/src/main/java/bisq/network/p2p/DecryptedDirectMessageListener.java (2)
M p2p/src/main/java/bisq/network/p2p/P2PService.java (325)
M p2p/src/main/java/bisq/network/p2p/PrefixedSealedAndSignedMessage.java (7)
M p2p/src/main/java/bisq/network/p2p/network/Connection.java (78)
M p2p/src/main/java/bisq/network/p2p/network/NetworkNode.java (9)
M p2p/src/main/java/bisq/network/p2p/network/SynchronizedProtoOutputStream.java (6)
M p2p/src/main/java/bisq/network/p2p/peers/PeerManager.java (531)
M p2p/src/main/java/bisq/network/p2p/peers/getdata/RequestDataManager.java (4)
M p2p/src/main/java/bisq/network/p2p/peers/peerexchange/GetPeersRequestHandler.java (10)
M p2p/src/main/java/bisq/network/p2p/peers/peerexchange/Peer.java (34)
M p2p/src/main/java/bisq/network/p2p/peers/peerexchange/PeerExchangeHandler.java (9)
M p2p/src/main/java/bisq/network/p2p/peers/peerexchange/PeerExchangeManager.java (8)
M p2p/src/main/java/bisq/network/p2p/peers/peerexchange/PeerList.java (31)
M p2p/src/main/java/bisq/network/p2p/peers/peerexchange/messages/GetPeersRequest.java (10)
M p2p/src/main/java/bisq/network/p2p/peers/peerexchange/messages/GetPeersResponse.java (8)
M p2p/src/main/java/bisq/network/p2p/storage/HashMapChangedListener.java (5)
M p2p/src/main/java/bisq/network/p2p/storage/P2PDataStorage.java (6)
M p2p/src/main/java/bisq/network/p2p/storage/persistence/StoreService.java (5)
M p2p/src/test/java/bisq/network/p2p/MockNode.java (2)
-- Patch Links --
https://github.com/bisq-network/bisq/pull/4610.patch
https://github.com/bisq-network/bisq/pull/4610.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/4610
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201008/b07f9192/attachment.html>
More information about the bisq-github
mailing list