-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put flexible waitForServer logic in AbstractRpcClient, use in Bitcoin…
…Client AbstractRpcClient: * add pollOnce() method that takes 1. JsonRpcRequest supplier 2. JavaType for expected result 3. Error mapper to ignore non-fatal errors in an application specific way * add flexible waitForServer() method that takes 1. timeout duration 2. retry duration 3. JsonRpcRequest supplier 4. JavaType for expected result 5. Error mapper to ignore non-fatal errors in an application specific way * add TransientErrorMapper functional interface * addition support methods BitcoinClient: * re-implement existing synchronous waitForServer() using async methods * add mapBitcoinTransientErrors function that implements existing logic to ignore "transient" errors and extract status messages from them. It also adds initial handling of java.net.ConnectException which is thrown by java.net.http when trying to connect to an unopened port.
- Loading branch information
1 parent
18a904e
commit e103b0a
Showing
2 changed files
with
233 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters