mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
refactor: unify container presence checks - find
The changes made here were: | From | To | |------------------------|------------------| | `m.find(k) == m.end()` | `!m.contains(k)` | | `m.find(k) != m.end()` | `m.contains(k)` |
This commit is contained in:
@@ -1107,8 +1107,8 @@ bool DescriptorScriptPubKeyMan::AddDescriptorKeyWithDB(WalletBatch& batch, const
|
||||
assert(!m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS));
|
||||
|
||||
// Check if provided key already exists
|
||||
if (m_map_keys.find(pubkey.GetID()) != m_map_keys.end() ||
|
||||
m_map_crypted_keys.find(pubkey.GetID()) != m_map_crypted_keys.end()) {
|
||||
if (m_map_keys.contains(pubkey.GetID()) ||
|
||||
m_map_crypted_keys.contains(pubkey.GetID())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user