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

Method GetOldestKeyPoolTime

src/wallet.cpp:3789–3808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3787}
3788#endif
3789int64_t CWallet::GetOldestKeyPoolTime()
3790{
3791 LOCK(cs_wallet);
3792
3793 // if the keypool is empty, return <NOW>
3794 if (setExternalKeyPool.empty() && setInternalKeyPool.empty())
3795 return GetTime();
3796
3797 CWalletDB walletdb(strWalletFile);
3798 int64_t oldestKey = -1;
3799
3800 // load oldest key from keypool, get time and return
3801 if (!setInternalKeyPool.empty()) {
3802 oldestKey = std::max(GetOldestKeyTimeInPool(setInternalKeyPool, walletdb), oldestKey);
3803 }
3804 if (!setExternalKeyPool.empty()) {
3805 oldestKey = std::max(GetOldestKeyTimeInPool(setExternalKeyPool, walletdb), oldestKey);
3806 }
3807 return oldestKey;
3808}
3809
3810std::map<CTxDestination, CAmount> CWallet::GetAddressBalances()
3811{

Callers 2

getwalletinfoFunction · 0.80
getinfoFunction · 0.80

Calls 4

GetTimeFunction · 0.85
maxFunction · 0.85
GetOldestKeyTimeInPoolFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected