forked from bitcoinj/bitcoinj
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use FilterRecalculateMode.SEND_IF_CHANGED
- Loading branch information
1 parent
7752cb7
commit 12beae6
Showing
2 changed files
with
10 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -214,11 +214,15 @@ public void onCoinsReceived(Wallet wallet, Transaction tx, Coin prevBalance, Coi | |
Script scriptPubKey = output.getScriptPubKey(); | ||
if (ScriptPattern.isP2PK(scriptPubKey) || ScriptPattern.isP2WPKH(scriptPubKey)) { | ||
if (output.isMine(wallet)) { | ||
if (tx.getConfidence().getConfidenceType() == TransactionConfidence.ConfidenceType.BUILDING) | ||
recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED); | ||
else | ||
recalculateFastCatchupAndFilter(FilterRecalculateMode.DONT_SEND); | ||
return; | ||
// if (tx.getConfidence().getConfidenceType() == TransactionConfidence.ConfidenceType.BUILDING) | ||
// recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED); | ||
// else | ||
// recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED); | ||
// return; | ||
// Original bitcoinj code is commented out. | ||
// This is a fix to https://github.com/bitcoinj/bitcoinj/issues/2070 | ||
// Maybe it fixes https://github.com/bisq-network/bisq/issues/4870 | ||
recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
oscarguindzberg
Author
Collaborator
|
||
} | ||
} | ||
} | ||
|
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
There was a
return;
in the previous code which stops the for loop. Is it ok that this is removed?