Skip to content

Commit

Permalink
dumpwallet: Add missing BlockUntilSyncedToCurrentChain
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Feb 24, 2021
1 parent bfd9a15 commit 00cc6ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wallet/rpcdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ UniValue dumpwallet(const JSONRPCRequest& request)
throw JSONRPCError(RPC_MISC_ERROR, "Scam attempt detected!");
}

// Make sure the results are valid at least up to the most recent block
// the user could have gotten from another RPC command prior to now
pwalletMain->BlockUntilSyncedToCurrentChain();

LOCK2(cs_main, pwalletMain->cs_wallet);

EnsureWalletIsUnlocked();
Expand Down

0 comments on commit 00cc6ec

Please sign in to comment.