aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRussell Yanofsky <[email protected]>2019-10-29 12:21:57 -0400
committerRussell Yanofsky <[email protected]>2019-10-29 12:21:57 -0400
commit628d11b2ba0f1ba715c2358373e603a56d9f69ff (patch)
tree60dbdb84e672f2ca17175fbff26d21bb3bf44780 /src
parentRefactor: Add GetLegacyScriptPubKeyMan helper (diff)
downloaddiscoin-628d11b2ba0f1ba715c2358373e603a56d9f69ff.tar.xz
discoin-628d11b2ba0f1ba715c2358373e603a56d9f69ff.zip
Add back mistakenly removed AssertLockHeld
Suggestion from MarcoFalke <[email protected]> https://github.com/bitcoin/bitcoin/pull/17260#discussion_r340029481
Diffstat (limited to 'src')
-rw-r--r--src/wallet/scriptpubkeyman.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp
index c13fddfaf..259bfcd76 100644
--- a/src/wallet/scriptpubkeyman.cpp
+++ b/src/wallet/scriptpubkeyman.cpp
@@ -386,6 +386,8 @@ bool LegacyScriptPubKeyMan::AddKeyPubKey(const CKey& secret, const CPubKey &pubk
bool LegacyScriptPubKeyMan::AddKeyPubKeyWithDB(WalletBatch& batch, const CKey& secret, const CPubKey& pubkey)
{
+ AssertLockHeld(cs_wallet);
+
// Make sure we aren't adding private keys to private key disabled wallets
assert(!m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS));