Skip to content

Commit

Permalink
Skip mempool.dat when wallet is starting in "zap" mode (dashpay#2782)
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 authored and codablock committed Apr 4, 2019
1 parent 46d8751 commit 35914e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4504,6 +4504,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);
Expand Down

0 comments on commit 35914e0

Please sign in to comment.