From 60a91848a49f069748ec5141cd369359a4f7955e Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 21 Mar 2019 09:46:43 +0300 Subject: [PATCH] Skip mempool.dat when wallet is starting in "zap" mode (#2782) --- src/validation.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/validation.cpp b/src/validation.cpp index 157aa59885f85..740ae31c51788 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4513,6 +4513,11 @@ static const uint64_t MEMPOOL_DUMP_VERSION = 1; bool LoadMempool(void) { + if (GetBoolArg("-zapwallettxes", false)) { + LogPrintf("Skipping mempool.dat because of zapwallettxes\n"); + return true; + } + int64_t nExpiryTimeout = GetArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY) * 60 * 60; FILE* filestr = fopen((GetDataDir() / "mempool.dat").string().c_str(), "rb"); CAutoFile file(filestr, SER_DISK, CLIENT_VERSION);