Skip to content

Commit

Permalink
Revert "Use FilterRecalculateMode.SEND_IF_CHANGED"
Browse files Browse the repository at this point in the history
This reverts commit 12beae6.
  • Loading branch information
oscarguindzberg committed Dec 16, 2020
1 parent dcf8af0 commit 902679f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
12 changes: 4 additions & 8 deletions core/src/main/java/org/bitcoinj/core/PeerGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,10 @@ 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.SEND_IF_CHANGED);
// 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);
if (tx.getConfidence().getConfidenceType() == TransactionConfidence.ConfidenceType.BUILDING)
recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED);
else
recalculateFastCatchupAndFilter(FilterRecalculateMode.DONT_SEND);
return;
}
}
Expand Down
1 change: 0 additions & 1 deletion core/src/test/java/org/bitcoinj/core/PeerGroupTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,6 @@ public void shutdown() {
assertEquals(2001, disconnectedPeers.take().getAddress().getPort());
}

@Ignore
@Test
public void testBloomOnP2PK() throws Exception {
// Cover bug 513. When a relevant transaction with a P2PK output is found, the Bloom filter should be
Expand Down

0 comments on commit 902679f

Please sign in to comment.