From e2291d2fb429649972adee3dd56aafab95ab225a Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Tue, 7 May 2013 12:00:50 +0200 Subject: [PATCH] Wallet: remove the affectedUs check in reorganize(). It was buggy, and if it had worked it would have introduced other issues. We always need to process the entire reorg to keep the depth and workDone counters on transactions accurate. --- core/src/main/java/com/google/bitcoin/core/Wallet.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/core/src/main/java/com/google/bitcoin/core/Wallet.java b/core/src/main/java/com/google/bitcoin/core/Wallet.java index 8e35f9f5..d1685f0a 100644 --- a/core/src/main/java/com/google/bitcoin/core/Wallet.java +++ b/core/src/main/java/com/google/bitcoin/core/Wallet.java @@ -2232,16 +2232,6 @@ public class Wallet implements Serializable, BlockChainListener { newBlockHashes.add(b.getHeader().getHash()); } - boolean affectedUs = false; - for (Sha256Hash hash : Iterables.concat(oldBlockHashes, newBlockHashes)) { - if (mapBlockTx.get(hash) != null) { - affectedUs = true; - break; - } - } - log.info(affectedUs ? "Re-org affected our transactions" : "Re-org had no effect on our transactions"); - if (!affectedUs) return; - // Avoid spuriously informing the user of wallet changes whilst we're re-organizing. This also prevents the // user from modifying wallet contents (eg, trying to spend) whilst we're in the middle of the process. onWalletChangedSuppressions++;