Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/scriptpubkeyman.cpp
Show First 20 Lines • Show All 331 Lines • ▼ Show 20 Lines | int64_t LegacyScriptPubKeyMan::GetOldestKeyPoolTime() { | ||||
return oldestKey; | return oldestKey; | ||||
} | } | ||||
size_t LegacyScriptPubKeyMan::KeypoolCountExternalKeys() { | size_t LegacyScriptPubKeyMan::KeypoolCountExternalKeys() { | ||||
AssertLockHeld(cs_wallet); | AssertLockHeld(cs_wallet); | ||||
return setExternalKeyPool.size() + set_pre_split_keypool.size(); | return setExternalKeyPool.size() + set_pre_split_keypool.size(); | ||||
} | } | ||||
const CKeyMetadata *LegacyScriptPubKeyMan::GetMetadata(uint160 id) const { | |||||
AssertLockHeld(cs_wallet); | |||||
auto it = mapKeyMetadata.find(CKeyID(id)); | |||||
if (it != mapKeyMetadata.end()) { | |||||
return &it->second; | |||||
} else { | |||||
auto it2 = m_script_metadata.find(CScriptID(id)); | |||||
if (it2 != m_script_metadata.end()) { | |||||
return &it2->second; | |||||
} | |||||
} | |||||
return nullptr; | |||||
} | |||||
/** | /** | ||||
* Update wallet first key creation time. This should be called whenever keys | * Update wallet first key creation time. This should be called whenever keys | ||||
* are added to the wallet, with the oldest key creation time. | * are added to the wallet, with the oldest key creation time. | ||||
*/ | */ | ||||
void LegacyScriptPubKeyMan::UpdateTimeFirstKey(int64_t nCreateTime) { | void LegacyScriptPubKeyMan::UpdateTimeFirstKey(int64_t nCreateTime) { | ||||
AssertLockHeld(cs_wallet); | AssertLockHeld(cs_wallet); | ||||
if (nCreateTime <= 1) { | if (nCreateTime <= 1) { | ||||
// Cannot determine birthday information, so set the wallet birthday to | // Cannot determine birthday information, so set the wallet birthday to | ||||
▲ Show 20 Lines • Show All 974 Lines • Show Last 20 Lines |