[bisq-network/bisq] Add tx broadcast to mempool explorer api (#4943)
wiz
notifications at github.com
Mon Dec 14 17:34:33 CET 2020
@wiz commented on this pull request.
> @@ -115,8 +114,21 @@ public void onSuccess(String txId) {
}
public void onFailure(@NotNull Throwable throwable) {
- log.warn("Broadcast of raw tx with txId {} to {} failed. Error={}",
- txIdToSend, url, throwable.toString());
+ Throwable cause = throwable.getCause();
+ if (cause instanceof HttpException) {
+ int responseCode = ((HttpException) cause).getResponseCode();
+ String message = cause.getMessage();
+ if (responseCode == 400 && message.equals("sendrawtransaction RPC error: {\"code\":-27,\"message\":\"Transaction already in block chain\"}")) {
Instead of checking for that exact message, maybe just checking for a substring of `\"code\":-27` is better, since the exact string might change in future releases of Bitcoin Core RPC
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4943#pullrequestreview-551568014
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201214/e5053cad/attachment-0001.htm>
More information about the bisq-github
mailing list