Remove use of NULL in wallet.cpp

Also remove redundant "return false"
This commit is contained in:
Alexander Block 2020-01-21 16:30:05 +01:00 committed by Pasta
parent 364cc42edb
commit 19b39167e8
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -337,11 +337,10 @@ bool CWallet::AddKeyPubKeyWithDB(CWalletDB &walletdb, const CKey& secret, const
pwalletdbEncryption = &walletdb;
}
if (!CCryptoKeyStore::AddKeyPubKey(secret, pubkey)) {
if (needsDB) pwalletdbEncryption = NULL;
return false;
if (needsDB) pwalletdbEncryption = nullptr;
return false;
}
if (needsDB) pwalletdbEncryption = NULL;
if (needsDB) pwalletdbEncryption = nullptr;
// check if we need to remove from watch-only
CScript script;
script = GetScriptForDestination(pubkey.GetID());