Remove Unspecified and use optional instead.
Add reporting for data requests and hash requests.
Report commit hash only if present.
Report messages only if an enum entry is present.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
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>
It is more convenient to handle the RejectedExecutionException in the calling code to get more context for error logging.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
Use executor at httpClient builder.
Use httpClient.sendAsync.
Add keep-alive header.
Add RejectedExecutionHandler.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
Use onDaoStateBlockCreated instead of onDaoStateHashesChanged to avoid multiple calls when we receive hashes from other nodes.
Add daoStateMonitoringService listener after blockchain parsing is completed
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
Use newCachedThreadPool instead of getThreadPoolExecutor
Utilities.getThreadPoolExecutor use a BlockingQueue which prevents the intended
behaviour to increase the pool size to the max value.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
PaymentMethod use an instance of TradeLimits and expect that it
has been injected, which is the case for desktop but not for
headless apps, so we enforce injection in the app base classes
used for headless apps.
The validation of trade statistics use a method in PaymentMethod
where that dependency is required.
Tha hack how the PaymentMethod use TradeLimits is not nice, but
would require more effort for refactoring.
We shut down with a deterministic delay per seed to avoid that all seeds shut down at the
same time in case of a reorg. We use 30 sec. as distance delay between the seeds to be on the
safe side. We have 12 seeds so that's 6 minutes.