Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce tx broadcast timeout #2657

Merged
merged 1 commit into from
Apr 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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