Commit Graph

12720 Commits

Author SHA1 Message Date
chimp1984
447235c2af
Dont reassign param 2020-10-08 18:23:03 -05:00
chimp1984
f53290b817
Copy peers in a new hashset to avoid concurrent modification exc at serialisation
Remove final
Cleanups
2020-10-08 18:23:03 -05:00
chimp1984
c7f23e8deb
Do not log size as we don't want to call potentially expensive toProtoMessage method 2020-10-08 18:23:03 -05:00
chimp1984
b748bffbfe
Add isPresent check 2020-10-08 18:23:03 -05:00
chimp1984
f36a17389e
Fix incorrect collection used in == 1 check 2020-10-08 18:23:03 -05:00
chimp1984
2fd010498d
Decrease failedConnectionAttempts onConnection
Rename method
2020-10-08 18:23:03 -05:00
chimp1984
351db88992
Use a hashset instead of list to avoid duplicates. Filter out my own node from persisted peers.
Remove log in DisputeAgentManager which gets called repeatedly
2020-10-08 18:23:03 -05:00
chimp1984
cfda0aff68
Fix tests 2020-10-08 18:23:03 -05:00
chimp1984
31ce5ccf67
Use connection.getPeersNodeAddressOptional().isPresent() instead of connection.hasPeersNodeAddress() which does the same internally 2020-10-08 18:23:03 -05:00
chimp1984
0686079946
Refactor: Rename method 2020-10-08 18:23:02 -05:00
chimp1984
ed960aba3f
Refactor: Rearrange code, remove unused methods, renamings (no functional change) 2020-10-08 18:23:02 -05:00
chimp1984
4575516d19
Refactor: Return early 2020-10-08 18:23:02 -05:00
chimp1984
31e7e26557
Fix incorrect handling of decryptedEntries size 2020-10-08 18:23:02 -05:00
chimp1984
983f610e73
Update p2p/src/main/java/bisq/network/p2p/network/Connection.java
Co-authored-by: sqrrm <sqrrm@users.noreply.github.com>
2020-10-08 18:23:02 -05:00
chimp1984
cf0693098f
Update common/src/main/java/bisq/common/app/Capability.java
Co-authored-by: sqrrm <sqrrm@users.noreply.github.com>
2020-10-08 18:23:02 -05:00
chimp1984
bf674ea0cf
Use getPersistedPeers for peerList.getList() calls
Rename getOptionalPersistedPeer to findPersistedPeer
Improve getConnectedReportedPeers method
2020-10-08 18:23:02 -05:00
chimp1984
25526750a8
Replace persistedPeers with peerList 2020-10-08 18:23:02 -05:00
chimp1984
25bfe2d6ad
Add findPeersCapabilities method
Impl. applyCapabilities

Cleanups
2020-10-08 18:23:02 -05:00
chimp1984
7af16d7af3
Add getDateAsLong method, add setter for capabilities 2020-10-08 18:23:01 -05:00
chimp1984
186a9d670d
Add findPeersCapabilities method 2020-10-08 18:23:01 -05:00
chimp1984
765f9ea940
Apply code inspection suggestions
The check for AckMessage is not needed anymore as we remove the interface from AckMessage
2020-10-08 18:23:01 -05:00
chimp1984
2523c2e914
Use getSingleThreadListeningExecutor, cleanups 2020-10-08 18:23:01 -05:00
chimp1984
bf659a1e6d
Pass supportedCapabilities to PeerManager. Not further processed yet, will be done in next commits
Cleanups
2020-10-08 18:23:01 -05:00
chimp1984
1c07be0507
Use only node address for equals and hashcode
Make capabilities final

If capability changes we would have had duplicate entries
2020-10-08 18:23:01 -05:00
chimp1984
17974f3dcc
Refactor: move SupportedCapabilitiesMessage handling code out to a method
Return early
2020-10-08 18:23:01 -05:00
chimp1984
9821dd6271
Clear capabilitiesListeners at shutdown
Improve logs
2020-10-08 18:23:01 -05:00
chimp1984
8aec306159
Remove verification for address prefix
Set address prefix to empty bytes in case we know that peer has capability (updated version)
Batch process mailbox messages in a thread.
Refactor handling of mailbox messages
2020-10-08 18:23:01 -05:00
chimp1984
40f9cfb7c5
Add methods for getting peers capabilities 2020-10-08 18:23:00 -05:00
chimp1984
6f7dfcf4ef
Make onRemoved default in interface 2020-10-08 18:23:00 -05:00
chimp1984
e73a4b4ae4
Cleanups
Remove debug log, remove annotation
2020-10-08 18:23:00 -05:00
chimp1984
9404e8fa87
Add NO_ADDRESS_PRE_FIX capability.
Add `boolean contains(Capability capability)` method
2020-10-08 18:23:00 -05:00
sqrrm
35e0c34c74
Merge pull request #4568 from oscarguindzberg/segwitWallet
Add segwit support to the BTC wallet
2020-10-09 00:22:14 +02:00
Oscar Guindzberg
261e0ec714
Check migratedWalletToSegwit is true 2020-10-08 17:26:24 -03:00
Oscar Guindzberg
87da2ae349
Do a backup of the wallet before segwit migration 2020-10-08 16:33:58 -03:00
Oscar Guindzberg
417daf5692
Use bitcoinj 0.15.8 (commit a733034) 2020-10-08 16:33:58 -03:00
Oscar Guindzberg
a747e83211
Fix add segwit keychain for encrypted wallet 2020-10-08 16:33:57 -03:00
Oscar Guindzberg
694446c296
Switch back to LegacyAddress for fee estimation 2020-10-08 16:33:57 -03:00
Oscar Guindzberg
1d82c01670
Improve error handling for P2WPKH 2020-10-08 16:33:57 -03:00
Oscar Guindzberg
499d7b7d35
Use try-with-resources 2020-10-08 16:33:56 -03:00
Oscar Guindzberg
3554e19084
setWitness(): Code clean up 2020-10-08 16:33:56 -03:00
Oscar Guindzberg
d1aaf3e4eb
Construct dummy outputs with LegacyAddress 2020-10-08 16:33:56 -03:00
Oscar Guindzberg
5524ba3e97
BtcWalletService.getFreshAddressEntry(): code clean up 2020-10-08 16:33:55 -03:00
Oscar Guindzberg
b9e404f0e2
Make it clear segwit is not used for the trade protocol yet. 2020-10-08 16:33:55 -03:00
Oscar Guindzberg
86ddd06e27
Validate AddressEntry.segwit 2020-10-08 16:33:55 -03:00
Oscar Guindzberg
4a2c0ad75a
Make codacy happy 2020-10-08 16:33:54 -03:00
Oscar Guindzberg
01455d2b20
Enable reusing unused AVAILABLE entries 2020-10-08 16:33:54 -03:00
Oscar Guindzberg
78a2a43d48
Remove unused import 2020-10-08 16:33:54 -03:00
Oscar Guindzberg
d1aeedd98b
Remove unused WalletService.findKeyFromPubKeyHash() 2020-10-08 16:33:53 -03:00
Oscar Guindzberg
e2f74f0250
Don't create a wallet address when not needed 2020-10-08 16:33:53 -03:00
Oscar Guindzberg
58afc00282
Don't create an extra address at startup 2020-10-08 16:33:53 -03:00