Skip to content

Commit

Permalink
Merge pull request #2657 from ManfredKarrer/reduce-timeout
Browse files Browse the repository at this point in the history
Reduce tx broadcast timeout
  • Loading branch information
ManfredKarrer authored Apr 7, 2019
2 parents 5cfa2c7 + 939c01f commit 6e9edc7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/src/main/java/bisq/core/btc/wallet/TxBroadcaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ default void onTimeout(TxBroadcastTimeoutException exception) {
void onFailure(TxBroadcastException exception);
}

private static final int DEFAULT_BROADCAST_TIMEOUT = 30;
// Currently there is a bug in BitcoinJ causing the timeout at all BSQ transactions.
// It is because BitcoinJ does not handle confidence object correctly in case as tx got altered after the
// Wallet.complete() method is called which is the case for all BSQ txs. We will work on a fix for that but that
// will take more time. In the meantime we reduce the timeout to 5 seconds to avoid that the trade protocol runs
// into a timeout when using BSQ for trade fee.
private static final int DEFAULT_BROADCAST_TIMEOUT = 5;
private static Map<String, Timer> broadcastTimerMap = new HashMap<>();

public static void broadcastTx(Wallet wallet, PeerGroup peerGroup, Transaction localTx, Callback callback) {
Expand Down

0 comments on commit 6e9edc7

Please sign in to comment.