aboutsummaryrefslogtreecommitdiff
path: root/src/rpcdump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpcdump.cpp')
-rw-r--r--src/rpcdump.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index 8180aadfb9..5bb4789cd3 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -60,9 +60,9 @@ Value importprivkey(const Array& params, bool fHelp)
key.SetSecret(secret, fCompressed);
CBitcoinAddress vchAddress = CBitcoinAddress(key.GetPubKey());
- CRITICAL_BLOCK(cs_main)
- CRITICAL_BLOCK(pwalletMain->cs_wallet)
{
+ LOCK2(cs_main, pwalletMain->cs_wallet);
+
pwalletMain->MarkDirty();
pwalletMain->SetAddressBookName(vchAddress, strLabel);