mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 14:54:15 +00:00
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.
This commit is contained in:
parent
4886a137bc
commit
e2291d2fb4
@ -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++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user