mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Do not import private keys to wallets with private keys disabled
This commit is contained in:
@@ -251,6 +251,9 @@ bool CWallet::AddKeyPubKeyWithDB(WalletBatch &batch, const CKey& secret, const C
|
||||
{
|
||||
AssertLockHeld(cs_wallet); // mapKeyMetadata
|
||||
|
||||
// Make sure we aren't adding private keys to private key disabled wallets
|
||||
assert(!IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS));
|
||||
|
||||
// CCryptoKeyStore has no concept of wallet databases, but calls AddCryptedKey
|
||||
// which is overridden below. To avoid flushes, the database handle is
|
||||
// tunneled through to it.
|
||||
|
||||
Reference in New Issue
Block a user