Commit Graph

937 Commits

Author SHA1 Message Date
HenrikJannsen
20b39a4055
Do not send close message to banned node
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-01-04 14:01:53 -05:00
HenrikJannsen
41fb5e464c
Use AtomicBoolean for stopped and timeoutTriggered
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-01-04 14:01:53 -05:00
HenrikJannsen
b7d1a9da22
Increase thread pool size at Broadcaster
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-01-03 19:58:29 -05:00
HenrikJannsen
d5b4ce275b
Add support for listeners when GetDataResponse and GetBlocksResponse are sent.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-27 17:54:08 -05:00
HenrikJannsen
1030f891b9
Improve/cleanup logs.
Only log lostAllConnections after numOnConnections > 2 to avoid logs at startup

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-27 17:54:08 -05:00
HenrikJannsen
a8a0c0e725
Add custom thread pool to broadcaster
The broadcasting consumes most of the threads but has lower priority than other messages being sent.
By separating that thread pool from the common sendMessage executor we can reduce the risk that a burst of
broadcasts exhausts the thread pool and might drop send message tasks.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-27 17:33:39 -05:00
HenrikJannsen
d5b65fe239
Reduce keepAliveTime to 30 sec.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-27 17:31:07 -05:00
HenrikJannsen
7953e35395
Add executor parameter to sendMessage
Add try/catch to handle RejectedExecutionException

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-27 17:13:13 -05:00
HenrikJannsen
4a72c27fa0
Increase queue capacity from 10 to 30.
https://github.com/bisq-network/bisq/issues/6480 reported reaching the limit with the current settings.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-22 08:46:02 +01:00
HenrikJannsen
30afccb2d6
Use ThreadPoolExecutor with custom set queueCapacity instead of CachedThreadPool
The previously used newCachedThreadPool carries higher risk for execution exceptions if exceeded.

Originally we had only one executor with a corePoolSize of 15 and a maximumPoolSize of 30 and queueCapacity was set to maximumPoolSize.
This was risky when the 15 corePool threads have been busy and new messages or connection creation threads are
queued up with potentially significant delay until getting served leading to timeouts.
Now we use (if maxConnections is 12) corePoolSize of 24, maximumPoolSize 36 and queueCapacity 10. This gives
considerable headroom. We also have split up the executors in 2 distinct ones.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-19 16:50:55 +01:00
HenrikJannsen
1b182743a2
Update BurningManAccountingStore_BTC_MAINNET
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-19 09:31:58 +01:00
HenrikJannsen
2f9f66280a
Remove try catch. Will be handled in Future fault handler
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-19 09:31:55 +01:00
HenrikJannsen
ddf5239800
Increase timeouts from 3 to 4 min.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-19 09:27:44 +01:00
HenrikJannsen
6aad3a8dc5
Reduce getDataResponse size from 9 MB to 6 MB
Reduce number of blocks at GetBlocksResponse from 4000 to 3000

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-19 09:27:27 +01:00
Christoph Atteneder
2b77f777a3
Update data stores for v1.9.7 2022-12-14 11:13:23 +01:00
Christoph Atteneder
5dea677644
Merge pull request #6459 from HenrikJannsen/handle_exception_at_send
Handle exception at send
2022-12-14 10:20:07 +01:00
Christoph Atteneder
71d6e126dd
Merge pull request #6423 from HenrikJannsen/add-burningman-accounting
Add burningman accounting
2022-12-14 10:17:38 +01:00
HenrikJannsen
8c65da9c85
Add thread index format
Add name param to newCachedThreadPool

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 20:35:49 -05:00
HenrikJannsen
fc2f9241b8
Apply codacy complaint
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 20:30:41 -05:00
HenrikJannsen
ebb6652cef
Remove restartTor method as restart is not supported anymore.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 18:15:23 -05:00
HenrikJannsen
c000d38a09
Remove unnecessary thread and try/catch.
Wrap nodeAddressProperty.set into UserThread.execute as it is a javafx api. We call startServer also in that execute scope to maintain order of calls.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 18:11:49 -05:00
HenrikJannsen
04a1dee9e9
Cleanup
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 18:07:01 -05:00
HenrikJannsen
6d2bd9f8d4
Use 3 distinct executors for send message, create connection and server.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 18:03:29 -05:00
HenrikJannsen
c4dfc2f9ac
Add ExecutorService to TorNetworkNode instead of using pool from base class.
Remove torStartupFuture as it was not needed.
Make executorService private and add shutdownNow call.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:57:19 -05:00
HenrikJannsen
0e34932ec8
Remove createExecutorService method and create executor in constructor instead.
Make executorService protected final

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:53:03 -05:00
HenrikJannsen
553dd84f28
Cleanups
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:49:51 -05:00
HenrikJannsen
43233db70c
Throw RuntimeException at sendMessage.
Make sendMessage package scope to not be used from client code.
Remove stacktrace print.

The caller in NetworkNode would report a onSuccess in the future callback because we do not escalate the exception but only handle it inside handleException.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:47:04 -05:00
HenrikJannsen
f90c4b8f6b
Use cachedThreadPool which uses SynchronousQueue instead of ArrayBlockingQueue.
When ArrayBlockingQueue is used (as in case of using Utilities.getListeningExecutorService) the maxPoolSize
has no effect. The pool creates never more threads than the core pool size.
Thus we have been limited to 15 threads for message sending and connection creation.
This was likely a reason why seed nodes are not accepting new connections if the pool is exhausted.
Slow message send can block a thread for 1-3 minutes.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:33:31 -05:00
HenrikJannsen
0dc8d0b2bd
Add maxConnection parameter to be used for setting the core pool size of the executor in NetworkNode.
We use double the maxConnection size for the core size and 4x for the max pool size.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 16:35:16 -05:00
HenrikJannsen
1e32d86b23
Only log errors if shutdown is not in progress.
I want to avoid to risk changes with not calling error handlers/listeners in those cases
as not 100% sure if that could have unintended effects.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 17:08:40 -05:00
HenrikJannsen
1bb4b55220
Add BurningManAccountingStore resource file.
Use resourceDataStoreService and extend StoreService

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:18 -05:00
HenrikJannsen
3caf2c2b64
Change visibility (will be used from monitor project).
Remove log, change log level.
Add getters

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-07 11:50:24 -05:00
Alejandro García
e054083c1f
Merge pull request #6376 from jmacxx/fix_issue_6367
Fix loss of mailbox messages during SPV resync
2022-11-29 14:41:27 +02:00
sqrrm
b10881ff7f
Merge pull request #6418 from HenrikJannsen/improve-dao-node-domain
Improve dao node domain
2022-11-26 16:19:52 +01:00
jmacxx
8a94642e1a
Do not erase mailbox messages during SPV resync. 2022-11-25 21:13:09 -06:00
Alejandro García
a6293a64cb
Merge pull request #6396 from jmacxx/show_commit_hash
Store the build's commit hash in Jarfile manifest
2022-11-25 17:36:34 +02:00
HenrikJannsen
ffd2cc1a8c
Handle nullable case caused by tests
Add mock to test.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-24 19:47:55 -05:00
HenrikJannsen
2de86222b7
Do not apply large persisted messages
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-24 13:36:47 -05:00
HenrikJannsen
143af43eba
Remove log level change for tor at startup
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-23 19:53:40 -05:00
HenrikJannsen
96ea154176
Rename delegate to outputStream
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-23 19:53:12 -05:00
HenrikJannsen
86723cf85a
Improve logging, cleanups
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-23 19:52:35 -05:00
HenrikJannsen
32f2f0ab76
Improve logging of persisted mailbox messages
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-23 19:51:23 -05:00
HenrikJannsen
91c25f8aa5
Limit getDataResponse to 90% of MAX_PERMITTED_MESSAGE_SIZE (10MB)
Allocate 25% of the space for PersistableNetworkPayloads and 75% for ProtectedStorageEntries

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-23 16:03:59 -05:00
HenrikJannsen
671ab1f373
Cleanup
Improve toString methods

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-17 19:55:04 -05:00
HenrikJannsen
de654c15b3
Improve handling of ConnectionState.expectedInitialDataResponses
Rename to expectedInitialDataResponses as we compare with numInitialDataResponses.
Add comment to make it more clear how its used.
Let the LiteNode increment only if getBlocks get called (e.g. blocks are missing).

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-17 19:41:32 -05:00
jmacxx
bc8b05ea45
Log readability will be improved by lowering to trace the repetitive
logging of: `The requester had version x.x.x.  Our historical data
store has version y.y.y  As the requester version is not older as our
historical store we do not add the data to the result map.`
Which takes up many screenfuls of log for every client getDataRequest.
2022-10-31 10:46:12 -05:00
Christoph Atteneder
80246e5d66
Update data stores for v1.9.6 2022-10-20 12:19:30 +02:00
chimp1984
5a77be64e3
Fix typo 2022-09-28 19:47:49 -05:00
chimp1984
42e8e511da
Add check isWasTruncated 2022-09-20 19:25:19 -05:00
chimp1984
5a7714786c
Fix missing argument in test 2022-09-20 18:33:24 -05:00
chimp1984
8725070c90
Add wasTruncated to onComplete handler
If truncated repeat requests
2022-09-20 18:33:23 -05:00
chimp1984
c4467ce03b
Set wasTruncated flag at GetDataResponse
If we truncated dateSortedTruncatablePayloads we set outTruncated flag to true (used for trade statistics)
2022-09-20 18:33:23 -05:00
chimp1984
c40d4ffffa
Add wasTruncated flag
Indicates if data response contained all data or was truncated
2022-09-20 18:33:23 -05:00
chimp1984
7d7eb13131
Reduce max entries to 5000 2022-09-20 18:33:23 -05:00
Christoph Atteneder
aefb342691
Not use git lfs anymore 2022-09-15 09:21:37 +02:00
Christoph Atteneder
7cddb74168
Update data stores for v1.9.5 2022-08-22 11:34:59 +02:00
jmacxx
8e21682e92
Add P2P network status indicator. 2022-08-18 10:46:39 -05:00
Christoph Atteneder
2561de9951
Merge pull request #6285 from jmacxx/tor_log_level
Set Tor logging to DEBUG level at startup
2022-07-12 09:53:10 +02:00
jmacxx
9893f52e57
Set Tor logging to DEBUG level at startup. 2022-07-08 12:26:58 -05:00
Christoph Atteneder
9bd1fd1423
Update data stores for v1.9.3 2022-06-27 17:00:56 +02:00
chimp1984
d1987330c7
Remove log 2022-05-31 12:34:51 +02:00
Christoph Atteneder
cbc1a6f43b
Update data stores for v1.9.0 2022-04-28 13:11:05 +02:00
jmacxx
c3e6a80f78
Add inbound Tor connectivity test. 2022-04-12 14:43:30 -05:00
Bisq GitHub Admin
c6293b5273
Merge pull request #6096 from bisq-network/release/v1.8.4
Release/v1.8.4
2022-03-11 15:57:55 +01:00
Christoph Atteneder
85714febf0
Update data stores for v1.8.3 (again) 2022-02-28 17:08:32 +01:00
xyzmaker123
e6320cdf06
Optimize imports 2022-02-28 13:53:38 +01:00
Christoph Atteneder
05f4f68356
Update data stores for v1.8.3 2022-02-24 20:48:17 +01:00
sqrrm
f315bd299e
Merge pull request #5993 from bisq-network/release/v1.8.2
Release/v1.8.2
2022-01-24 16:26:35 +01:00
Christoph Atteneder
06ab4dfa2a
Update data stores for v1.8.1 2022-01-18 11:38:30 +01:00
jmacxx
c9235299a8
Postpone accessing preferences BridgeAddressProvider until needed by Tor.
Previously they would be accessed too early when preferences had not
yet been read from disk.  Now we access them when Tor is started.
2022-01-16 11:38:14 -06:00
Christoph Atteneder
a1d0e570d1
Apply minor improvements and clean-ups 2022-01-11 12:36:44 +01:00
jmacxx
9334cffc89
Feature enabling log file upload to mediators 2022-01-06 13:22:44 -06:00
jmacxx
30706f05e2
No. of threads is already logged every 10 minutes from printSystemLoad 2021-12-24 12:40:49 -06:00
jmacxx
0b66fdcbef
Statistics logging changes
Add thread count to periodic logged statistics
Increase the statistic logging interval from 5 minutes to 1 hour
2021-12-23 14:42:18 -06:00
Christoph Atteneder
7d66264453
Update data stores for v1.8.0 (again, again) 2021-12-08 21:13:21 +01:00
chimp1984
81d112bdf3
Add null checks
Return early at connection if stopped
Cleanup logs
2021-12-08 19:39:37 +01:00
chimp1984
ee1371276f
Reduce timeouts
Add logs when shutdown starts
2021-12-08 19:39:37 +01:00
chimp1984
c58d9a9edd
Do not shut down networkNode and Tor in parallel as network node
requires still tor when sending close messages.
Reduce timeout from 5 sec to 2 sec.
Reduce timeout for executor shutdown from 500 ms to 100 ms
2021-12-08 19:39:36 +01:00
Steven Barclay
484afbc522
Code cleanup: replace (Bi)Function<..,Boolean> with (Bi)Predicate<..>
Replace 'BiFunction<T, U, Boolean>' with the primitive specialisation
'BiPredicate<T, U>' in HashCashService & FilterManager.

As part of this, replace similar predicate constructs found elsewhere.
NOTE: This touches the DAO packages (trivially @ VoteResultService).
2021-12-07 09:35:41 +01:00
Christoph Atteneder
10433e3a71
Update data stores for v1.8.0 (again) 2021-11-24 13:51:10 +01:00
Christoph Atteneder
dd6af18350
Update data stores for v1.8.0 2021-11-24 11:47:53 +01:00
chimp1984
a00667bbc2
Clean up log 2021-11-09 20:00:34 +01:00
Christoph Atteneder
c3bb0162d6
Fix Git LFS pointers 2021-11-09 19:03:01 +01:00
chimp1984
80e7c452ca
Add BsqBlocks resources and update DaoState
Add BsqBlocks resources
2021-11-09 13:01:20 +01:00
Christoph Atteneder
2d3cf388eb
Merge pull request #5788 from jmacxx/fix_refresh_ttl_exception
Gracefully handle null data in refresh offer message and log error
2021-11-04 10:06:44 +01:00
chimp1984
f7fcaa915e
Add BSQ swap code 2021-11-02 16:18:50 +01:00
chimp1984
d5dfdb4a35
Merge branch 'chimp-bsq-swap-1' into bsq-swap-low-risk-refactorings-2
# Conflicts:
#	core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java
#	core/src/main/java/bisq/core/api/CoreOffersService.java
#	core/src/main/java/bisq/core/btc/listeners/TxConfidenceListener.java
#	core/src/main/java/bisq/core/notifications/alerts/market/MarketAlerts.java
#	core/src/main/java/bisq/core/offer/OpenOfferManager.java
#	core/src/main/java/bisq/core/offer/bisq_v1/CreateOfferService.java
#	core/src/main/java/bisq/core/offer/bisq_v1/OfferPayload.java
#	core/src/main/java/bisq/core/offer/bisq_v1/TakeOfferModel.java
#	core/src/main/java/bisq/core/offer/bisq_v1/TriggerPriceService.java
#	core/src/main/java/bisq/core/proto/ProtoDevUtil.java
#	core/src/main/java/bisq/core/trade/TradeManager.java
#	core/src/main/java/bisq/core/trade/bisq_v1/TradeResultHandler.java
#	core/src/main/java/bisq/core/trade/bisq_v1/TradeUtil.java
#	core/src/main/java/bisq/core/trade/model/bisq_v1/Trade.java
#	core/src/main/java/bisq/core/trade/protocol/FluentProtocol.java
#	core/src/main/java/bisq/core/trade/protocol/Provider.java
#	core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java
#	core/src/main/java/bisq/core/trade/protocol/TradeProtocolFactory.java
#	core/src/main/java/bisq/core/trade/protocol/TradeTaskRunner.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/DisputeProtocol.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/model/ProcessModel.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/ApplyFilter.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/TradeTask.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/maker/MakerCreateAndSignContract.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/taker/TakerVerifyAndSignContract.java
#	core/src/main/java/bisq/core/trade/statistics/TradeStatistics2.java
#	core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java
#	core/src/main/java/bisq/core/trade/txproof/xmr/XmrTxProofService.java
#	desktop/src/main/java/bisq/desktop/components/paymentmethods/PaymentMethodForm.java
#	desktop/src/main/java/bisq/desktop/main/PriceUtil.java
#	desktop/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTradableFactory.java
#	desktop/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTrade.java
#	desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java
#	desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java
#	desktop/src/main/java/bisq/desktop/main/market/spread/SpreadViewModel.java
#	desktop/src/main/java/bisq/desktop/main/offer/BuyOfferView.java
#	desktop/src/main/java/bisq/desktop/main/offer/OfferView.java
#	desktop/src/main/java/bisq/desktop/main/offer/SellOfferView.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferDataModel.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferView.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferViewModel.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferDataModel.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferView.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferViewModel.java
#	desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBook.java
#	desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java
#	desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java
#	desktop/src/main/java/bisq/desktop/main/overlays/windows/OfferDetailsWindow.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesDataModel.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/editoffer/EditOfferDataModel.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/failedtrades/FailedTradesDataModel.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersDataModel.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersView.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java
#	desktop/src/main/java/bisq/desktop/util/DisplayUtils.java
#	desktop/src/test/java/bisq/desktop/main/offer/bisq_v1/createoffer/CreateOfferDataModelTest.java
#	desktop/src/test/java/bisq/desktop/main/offer/bisq_v1/createoffer/CreateOfferViewModelTest.java
#	desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookListItemMaker.java
#	desktop/src/test/java/bisq/desktop/main/portfolio/editoffer/EditOfferDataModelTest.java
#	desktop/src/test/java/bisq/desktop/maker/OfferMaker.java
#	monitor/src/main/java/bisq/monitor/metric/P2PMarketStats.java
2021-11-02 16:04:12 +01:00
jmacxx
28eb3f04ca
Add error log message for context 2021-11-02 09:56:24 -05:00
jmacxx
e65a992b26
Gracefully handle null data in refresh offer message and log error 2021-10-29 12:18:18 -05:00
Christoph Atteneder
8bcfbea477
Update data stores for v1.7.5 2021-10-26 11:57:36 +02:00
chimp1984
63c385bbba
Add support for RemoveDataMessage in testCapability
Refactor testCapability
2021-10-21 17:44:18 +02:00
chimp1984
23af4558b5
Add filterPredicate 2021-10-21 10:13:19 +02:00
chimp1984
b80b6ec836
Cleanups 2021-10-21 10:12:57 +02:00
chimp1984
07354191a6
Remove handling of BundleOfEnvelopes in send method.
It is basically never executed and throttling would avoid it as well.
Cleanups, Rename
2021-10-21 10:12:28 +02:00
sqrrm
5e84713520
Merge pull request #5730 from bisq-network/release/v1.7.4
Release/v1.7.4
2021-09-28 15:05:42 +02:00
Christoph Atteneder
29ede5f3c4
Update data stores for v1.7.4 2021-09-23 10:01:04 +02:00
chimp1984
4dd7061c27
Refactor service filtering
Make it more clear that we expect only one
matching service which can handle the payload.
2021-09-21 10:35:18 +02:00
chimp1984
c90c62c2cd
Remove getAppendOnlyDataStoreMap method for tests
Use appendOnlyDataStoreService.getMap(persistableNetworkPayload)
instead.
2021-09-21 10:33:25 +02:00
chimp1984
b9106b0795
Update tests 2021-09-21 01:04:13 +02:00
chimp1984
19b52ba6f6
When daoActivated is set to false the DAO P2P data
are still received from seed nodes and processed but
as the services for processing the payloads are not
added the data is inefficiently processed.
The getMap returned a flattened map of all maps in
all services which can be quite large.
We use now a filtered map with calling canHandle
first. Also the put got optimized to indicate in the
return value if there has been a service found to add
the payload. If not we do not invoke the listeners and
do not broadcast.

To not request the DAO P2P data would be better but I
don't see a easy way how to do that as the P2P network
is not aware of the type of data. Some market interface
could be used and a flag at the request to the seed node
to indicate if those types should be included but that
does feel too customized for a special use case. The
DAO P2P data is not that big as well, so I think for now
that fix should be good enough.
2021-09-20 23:59:17 +02:00