chimp1984
39c8ade5ef
Cleanups: Remove outdated TODOs, fix typos
2020-10-08 22:00:57 -05:00
chimp1984
18a27e9067
Republish trade statistics from seller side if peer capability is know. This is not the case without getting PR #4609 merges as well.
...
We only do it for 2 weeks after planned release time as then it can be assumed that enough nodes have updated that the normal publishing will distribute the object sufficiently.
2020-10-08 18:49:15 -05:00
chimp1984
17f4ae2b54
Add check that size is > LOOK_BACK_RANGE
2020-10-08 18:49:14 -05:00
chimp1984
213050c3d1
Add filter for excluding null objects
2020-10-08 18:49:14 -05:00
chimp1984
fa374b99fb
Do conversion in a thread to not block UI thread. takes about 4 seconds on my machine.
...
Add shutdown method to TradeStatisticsConverter and call it via TradeStatisticsManager. Now as we have a reference to TradeStatisticsConverter in we don't need the hack anymore in applyInjector.
Set log level for com.neemre.btcdcli4j.core.client.ClientConfigurator to error as there is an expected warn log because of the outdated version.
2020-10-08 18:49:14 -05:00
chimp1984
f56fe42ae1
Add injector.getInstance(TradeStatisticsConverter.class) to BisqExecutable to enforce inclusion.
...
Cleanups, renamings
2020-10-08 18:49:14 -05:00
chimp1984
9016cb6c32
Prune mediator and refund agent entries for all entries beside the last 100 we use for the selection algorithm.
2020-10-08 18:49:14 -05:00
chimp1984
0e70a99c42
Adjust tests, remove tests which do not make sense anymore
2020-10-08 18:49:13 -05:00
chimp1984
52be126667
Apply TradeStatistics3 to client classes
2020-10-08 18:49:13 -05:00
chimp1984
c4a4c878b8
Apply TradeStatistics3 to TradeStatisticsManager and some related classes
2020-10-08 18:48:52 -05:00
chimp1984
98207518d6
We "hack" TradeStatistics2StorageService to fulfill our needs:
...
1. We do not want that initial data request/response use old trades statistics for excluded key hashes.
Thats why we return an empty map in getMap.
2. We do not read resource file as we have removed that.
3. We do not persist as we convert the existing data and re-publish as new data, or at startup we convert the old data to the new one and then delete the file.
2020-10-08 18:48:52 -05:00
chimp1984
6d43c09b33
Delete TradeStatistics (version 1)
2020-10-08 18:48:52 -05:00
chimp1984
b2665bdd2c
let seller publish trade statistics only if peer is updated user. If not the peer will publish only.
2020-10-08 18:48:52 -05:00
chimp1984
a522d0ade9
Refactor: Rename class
2020-10-08 18:48:17 -05:00
chimp1984
b75aa6771f
Refactor: Move class
2020-10-08 18:48:17 -05:00
chimp1984
406bcfb064
Remove PublishTradeStatistics from buyer protocol
...
We let seller publish trade stats to avoid those issues with duplicated entries as trade date is different.
We could fix that to use the same trade date, but it seems to be not needed that both traders are publishing and the
risk if a trade stat does not get successfully published does not cause real problems.
There is guarantee anyway that the data is broadcast even if both do it.
In case we still want to do it from both sides we need to use the sellers trade date which is exchanged early in the trade
protocol but yet not further used beside for account age check.
2020-10-08 18:48:17 -05:00
chimp1984
00bed02839
Add TradeStatistics3 and related classes
...
Add TRADE_STATISTICS_3 Capability
Add TradeStatistics3 to proto resolvers
Make message TradeStatistics2 deprecated
2020-10-08 18:48:17 -05:00
chimp1984
c88bc1c99c
Use custom class MailboxItem instead of Tuple
...
Rename mailboxMap to mailboxItemsByUid
2020-10-08 18:23:04 -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
0686079946
Refactor: Rename method
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
9404e8fa87
Add NO_ADDRESS_PRE_FIX capability.
...
Add `boolean contains(Capability capability)` method
2020-10-08 18:23:00 -05: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
Oscar Guindzberg
1f3c585c35
Serialize tx without segwit
...
This is for backwards compatibility with bisq nodes that have not
upgraded to bitcoinj 0.15.
2020-10-08 16:33:52 -03:00
Oscar Guindzberg
f9f5d92941
Add segwit/legacy checbox for address creation
2020-10-08 16:33:52 -03:00
Oscar Guindzberg
a9cc28f65a
AddressEntryList: arbitrator entry use P2PKH
2020-10-08 16:33:52 -03:00
Oscar Guindzberg
a3708485f9
New AddressEntry: use different script types
...
Use P2WPKH for AVAILABLE context and P2PKH for the rest.
Disable reusing unused AVAILABLE entries until segwit support is
mandatory in Bisq.
2020-10-08 16:33:51 -03:00
Oscar Guindzberg
d8b755794e
WalletService: adapt to segwit wallet
2020-10-08 16:33:51 -03:00
Oscar Guindzberg
25515710ab
TradeWalletService: adapt to segwit wallet
2020-10-08 16:33:51 -03:00
Oscar Guindzberg
0f4c66f43d
Comment out segwit BSQ account path
...
Segwit is not used for BSQ
2020-10-08 16:33:50 -03:00
Oscar Guindzberg
0c7f3456b6
Fix log msg in BtcCoinSelector
2020-10-08 16:33:50 -03:00
Oscar Guindzberg
e85c66b810
Stop using LegacyAddress for btc addresses
2020-10-08 16:33:49 -03:00
Oscar Guindzberg
ced357ce25
AddressEntry: Add boolean segwit flag
2020-10-08 16:33:49 -03:00