diff --git a/src/validation.cpp b/src/validation.cpp index 469e6a537..ab1d1862b 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -5507,8 +5507,9 @@ bool LoadMempool(const Config &config) { } int64_t count = 0; - int64_t skipped = 0; + int64_t expired = 0; int64_t failed = 0; + int64_t already_there = 0; int64_t nNow = GetTime(); try { @@ -5546,10 +5547,18 @@ bool LoadMempool(const Config &config) { if (state.IsValid()) { ++count; } else { - ++failed; + // mempool may contain the transaction already, e.g. from + // wallet(s) having loaded it while we were processing + // mempool transactions; consider these as valid, instead of + // failed, but mark them as 'already there' + if (g_mempool.exists(tx->GetHash())) { + ++already_there; + } else { + ++failed; + } } } else { - ++skipped; + ++expired; } } std::map mapDeltas; @@ -5565,9 +5574,9 @@ bool LoadMempool(const Config &config) { return false; } - LogPrintf("Imported mempool transactions from disk: %i successes, %i " - "failed, %i expired\n", - count, failed, skipped); + LogPrintf("Imported mempool transactions from disk: %i succeeded, %i " + "failed, %i expired, %i already there\n", + count, failed, expired, already_there); return true; }