From bea6c6d2bfe68449f1698104c2290f9eb4a22e91 Mon Sep 17 00:00:00 2001 From: FornaxA Date: Fri, 3 Apr 2020 08:10:45 +0200 Subject: [PATCH] Skip checking for duplicate inputs when adding zerocoin txs to the wallet As all zerocoin transactions have inputs with tx hash 0x0, all zerocoin transactions were marked as 'conflicted' due to having the same inputs as other transactions. --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index f579da157e257..3590488f950a1 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1232,7 +1232,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransactionRef& ptx, const CBlockI for (const CTxIn& txin : tx.vin) { std::pair range = mapTxSpends.equal_range(txin.prevout); while (range.first != range.second) { - if (range.first->second != tx.GetHash()) { + if (range.first->second != tx.GetHash() && range.first->first.hash != uint256()) { LogPrintf("Transaction %s (in block %s) conflicts with wallet transaction %s (both spend %s:%i)\n", tx.GetHash().ToString(), pIndex->GetBlockHash().ToString(), range.first->second.ToString(), range.first->first.hash.ToString(), range.first->first.n); MarkConflicted(pIndex->GetBlockHash(), range.first->second); }