MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetOldestKeyPoolTime

Method GetOldestKeyPoolTime

src/wallet/scriptpubkeyman.cpp:554–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

552}
553
554std::optional<int64_t> LegacyScriptPubKeyMan::GetOldestKeyPoolTime() const
555{
556 LOCK(cs_KeyStore);
557
558 WalletBatch batch(m_storage.GetDatabase());
559
560 // load oldest key from keypool, get time and return
561 int64_t oldestKey = GetOldestKeyTimeInPool(setExternalKeyPool, batch);
562 if (IsHDEnabled() && m_storage.CanSupportFeature(FEATURE_HD_SPLIT)) {
563 oldestKey = std::max(GetOldestKeyTimeInPool(setInternalKeyPool, batch), oldestKey);
564 if (!set_pre_split_keypool.empty()) {
565 oldestKey = std::max(GetOldestKeyTimeInPool(set_pre_split_keypool, batch), oldestKey);
566 }
567 }
568
569 return oldestKey;
570}
571
572size_t LegacyScriptPubKeyMan::KeypoolCountExternalKeys() const
573{

Callers

nothing calls this directly

Calls 2

GetOldestKeyTimeInPoolFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected