From 628d11b2ba0f1ba715c2358373e603a56d9f69ff Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Tue, 29 Oct 2019 12:21:57 -0400 Subject: Add back mistakenly removed AssertLockHeld Suggestion from MarcoFalke https://github.com/bitcoin/bitcoin/pull/17260#discussion_r340029481 --- src/wallet/scriptpubkeyman.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index c13fddfaf3..259bfcd76d 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)); -- cgit v1.2.3