Merge pull request #112 from blackjok3rtt/jl777

fix erase expired tx on wallet load
This commit is contained in:
blackjok3rtt
2019-05-19 00:17:40 +08:00
committed by GitHub

View File

@@ -2874,9 +2874,9 @@ void CWallet::ReacceptWalletTransactions()
bool invalid = state.IsInvalid(nDoS);
// log rejection and deletion
// printf("ERROR reaccepting wallet transaction %s to mempool, reason: %s, DoS: %d\n", wtx.GetHash().ToString().c_str(), state.GetRejectReason().c_str(), nDoS);
//printf("ERROR reaccepting wallet transaction %s to mempool, reason: %s, DoS: %d\n", wtx.GetHash().ToString().c_str(), state.GetRejectReason().c_str(), nDoS);
if (!wtx.IsCoinBase() && invalid && nDoS > 0)
if (!wtx.IsCoinBase() && invalid && nDoS > 0 && state.GetRejectReason() != "tx-overwinter-expired")
{
LogPrintf("erasing transaction %s\n", wtx.GetHash().GetHex().c_str());
vwtxh.push_back(wtx.GetHash());