Skip to content

Commit

Permalink
wallet: Add BlockUntilSyncedToCurrentChain to dumpwallet
Browse files Browse the repository at this point in the history
Just the actual fix

Github-Pull: bitcoin#18671
Rebased-From: fa60afc (partial)
  • Loading branch information
MarcoFalke authored and luke-jr committed May 5, 2020
1 parent a840dab commit 295027c
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 @@ -752,6 +752,10 @@ UniValue dumpwallet(const JSONRPCRequest& request)

LegacyScriptPubKeyMan& spk_man = EnsureLegacyScriptPubKeyMan(*wallet);

// 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
wallet->BlockUntilSyncedToCurrentChain();

auto locked_chain = pwallet->chain().lock();
LOCK2(pwallet->cs_wallet, spk_man.cs_KeyStore);

Expand Down

0 comments on commit 295027c

Please sign in to comment.