MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetOldestKeyTimeInPool

Function GetOldestKeyTimeInPool

src/wallet/wallet.cpp:3496–3508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3494}
3495
3496static int64_t GetOldestKeyTimeInPool(const std::set<int64_t>& setKeyPool, WalletBatch& batch) {
3497 if (setKeyPool.empty()) {
3498 return GetTime();
3499 }
3500
3501 CKeyPool keypool;
3502 int64_t nIndex = *(setKeyPool.begin());
3503 if (!batch.ReadPool(nIndex, keypool)) {
3504 throw std::runtime_error(std::string(__func__) + ": read oldest key in keypool failed");
3505 }
3506 assert(keypool.vchPubKey.IsValid());
3507 return keypool.nTime;
3508}
3509
3510int64_t CWallet::GetOldestKeyPoolTime()
3511{

Callers 1

GetOldestKeyPoolTimeMethod · 0.85

Calls 5

GetTimeFunction · 0.85
ReadPoolMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected