diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index ff4d95b947b..e711f7639c3 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1723,8 +1723,11 @@ void CWallet::ReacceptWalletTransactions() int nDepth = wtx.GetDepthInMainChain(); - if (!(wtx.IsCoinBase() || wtx.IsCoinStake()) && (nDepth == 0 && !wtx.isAbandoned())) { - mapSorted.insert(std::make_pair(wtx.nOrderPos, &wtx)); + if (nDepth == 0 && !wtx.isAbandoned()) { + if (wtx.IsCoinBase() || wtx.IsCoinStake()) + AbandonTransaction(wtxid); + else + mapSorted.insert(std::make_pair(wtx.nOrderPos, &wtx)); } }