Skip to content

Commit

Permalink
Merged in skip-duplicate-check-zerocoin-wallet (pull request dashpay#47)
Browse files Browse the repository at this point in the history
[FIX] Skip checking for duplicate inputs when adding zerocoin txs to the wallet

Approved-by: Cevap
  • Loading branch information
FornaxA authored and Cevap committed Apr 3, 2020
2 parents 5e5f1d3 + bea6c6d commit 4ecd5d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransactionRef& ptx, const CBlockI
for (const CTxIn& txin : tx.vin) {
std::pair<TxSpends::const_iterator, TxSpends::const_iterator> 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);
}
Expand Down

0 comments on commit 4ecd5d4

Please sign in to comment.