Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/scriptpubkeyman.cpp
Show First 20 Lines • Show All 1,671 Lines • ▼ Show 20 Lines | for (int32_t i = m_wallet_descriptor.range_start; | ||||
strprintf("Error: Already loaded script at index %d as " | strprintf("Error: Already loaded script at index %d as " | ||||
"being at index %d", | "being at index %d", | ||||
i, m_map_script_pub_keys[script])); | i, m_map_script_pub_keys[script])); | ||||
} | } | ||||
m_map_script_pub_keys[script] = i; | m_map_script_pub_keys[script] = i; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
bool DescriptorScriptPubKeyMan::AddKey(const CKeyID &key_id, const CKey &key) { | |||||
LOCK(cs_desc_man); | |||||
m_map_keys[key_id] = key; | |||||
return true; | |||||
} | |||||
bool DescriptorScriptPubKeyMan::AddCryptedKey( | |||||
const CKeyID &key_id, const CPubKey &pubkey, | |||||
const std::vector<uint8_t> &crypted_key) { | |||||
LOCK(cs_desc_man); | |||||
if (!m_map_keys.empty()) { | |||||
return false; | |||||
} | |||||
m_map_crypted_keys[key_id] = make_pair(pubkey, crypted_key); | |||||
return true; | |||||
} |