chimp1984
4d2f1b5d43
Set memo to tx after tx creation and not on broadcast success, as broadcast success might not get called (even it is broadcast -> pending btcj bug)
2020-10-10 19:01:51 -05:00
chimp1984
608166ce64
When a refund agent closes a case we have checked that the trade protocol is the same between offer and refund agent.
...
This would fail once we update trade protocol version when we release segwit. So this fixes that as it only checks if the version is not the old version (1) where refund agents have not been part of the system.
Also checks for legacy arbitrator that it only can be used for version 1 cases. Not tested and not assumed that this code will be executed as old arbitrators would use the old app in case they need to still work on a old case.
2020-10-10 15:55:19 -05:00
Christoph Atteneder
3687a03695
Merge pull request #4611 from chimp1984/new-trade-statistics
...
New trade statistics
2020-10-09 06:43:56 +02:00
Christoph Atteneder
352d954489
Merge pull request #4610 from chimp1984/remove-address-prefix
...
Remove address prefix
2020-10-09 06:43:33 +02:00
chimp1984
39c8ade5ef
Cleanups: Remove outdated TODOs, fix typos
2020-10-08 22:00:57 -05:00
chimp1984
66740b7dc1
Remove unused variable
2020-10-08 19:02:51 -05:00
chimp1984
68a10cf5a1
Remove comment line
2020-10-08 18:51:24 -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
197d8c1e0d
Remove copy&past mistake
2020-10-08 18:49:15 -05:00
chimp1984
58d2f1bda9
Apply codacy suggestions
...
@ripcurl: The complaint about private constructors (using guice this is legit) should be removed IMO.
2020-10-08 18:49:15 -05:00
chimp1984
e95ab2a0b4
Add resource file for 1.4.0 (should be updated at release time)
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
b14266d815
Remove resource file
2020-10-08 18:49:14 -05:00
chimp1984
6766835af6
Use TradeStatistics3 in protobuf file
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
6e3fdbc96a
Apply codacy suggestions
2020-10-08 18:23:04 -05:00
chimp1984
4f685f8f4b
When updating the capability from a reported peer we check if the reported one has higher capabilities, otherwise we ignore it.
2020-10-08 18:23:04 -05:00
chimp1984
c8feef150e
Apply code review suggestions
...
Fix incorrectly commented out code (was for dev testing commented out)
2020-10-08 18:23:04 -05:00
chimp1984
c88bc1c99c
Use custom class MailboxItem instead of Tuple
...
Rename mailboxMap to mailboxItemsByUid
2020-10-08 18:23:04 -05:00
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