From 7e89994133725125dddbfa8d45484e3b9ed51c6e Mon Sep 17 00:00:00 2001 From: Antoine Riard Date: Thu, 15 Aug 2019 11:42:16 -0400 Subject: [PATCH] Remove SyncTransaction for conflicted txn in CWallet::BlockConnected We shouldn't rely on this sync call to get an accurate view of txn state, if a tx conflicts with one in mapTx we are going to update our wallet dependencies in AddToWalletIfInvolvingMe while conflicting txn get connected. If it doesn't conflict with one of our dependencies we are not going to track it anyway. This is a cleanup, as this SyncTransaction is redundant with the following one for confirmation which is triggering the MarkConflicted logic. We keep the loop because set of conflicted txn isn't same as txn included in block. --- src/wallet/wallet.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 098f7990ad..8b636c41a2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1410,22 +1410,14 @@ void CWallet::BlockConnected(const CBlock& block, const std::vector