| 3787 | } |
| 3788 | #endif |
| 3789 | int64_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 | |
| 3810 | std::map<CTxDestination, CAmount> CWallet::GetAddressBalances() |
| 3811 | { |
no test coverage detected