diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2019-10-29 12:21:57 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2019-10-29 12:21:57 -0400 |
commit | 628d11b2ba0f1ba715c2358373e603a56d9f69ff (patch) | |
tree | 60dbdb84e672f2ca17175fbff26d21bb3bf44780 /src/wallet/scriptpubkeyman.cpp | |
parent | 52cf68f7ffa1dd3a6850606a75c32b77b1308c4b (diff) | |
download | bitcoin-628d11b2ba0f1ba715c2358373e603a56d9f69ff.tar.xz |
Add back mistakenly removed AssertLockHeld
Suggestion from MarcoFalke <falke.marco@gmail.com>
https://github.com/bitcoin/bitcoin/pull/17260#discussion_r340029481
Diffstat (limited to 'src/wallet/scriptpubkeyman.cpp')
-rw-r--r-- | src/wallet/scriptpubkeyman.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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)); |