[bisq-network/bisq] Add tx broadcast to mempool explorer api (#4943)

wiz notifications at github.com
Mon Dec 14 18:39:14 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\"}")) {

https://github.com/bitcoin/bitcoin/blob/master/src/rpc/protocol.h

-- 
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#discussion_r542575968
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201214/fe746aad/attachment.htm>


More information about the bisq-github mailing list