| 552 | } |
| 553 | |
| 554 | std::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 | |
| 572 | size_t LegacyScriptPubKeyMan::KeypoolCountExternalKeys() const |
| 573 | { |
nothing calls this directly
no test coverage detected