MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetOldestKeyTimeInPool

Function GetOldestKeyTimeInPool

src/wallet.cpp:3771–3787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3769}
3770#if 1
3771static int64_t GetOldestKeyTimeInPool(const std::set<int64_t>& setKeyPool, CWalletDB& walletdb) {
3772
3773 if (setKeyPool.empty()) {
3774 return GetTime();
3775 }
3776
3777 CKeyPool keypool;
3778 int64_t nIndex = *(setKeyPool.begin());
3779 if (!walletdb.ReadPool(nIndex, keypool)) {
3780 throw std::runtime_error(std::string(__func__) + ": read oldest key in keypool failed");
3781 }
3782 if (!keypool.vchPubKey.IsValid()) {
3783 LogPrintf("%s: vchPubKey is invalid\n",__func__);
3784 return GetTime();
3785 }
3786 return keypool.nTime;
3787}
3788#endif
3789int64_t CWallet::GetOldestKeyPoolTime()
3790{

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