File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -3069,12 +3069,18 @@ int64_t CWallet::GetOldestKeyPoolTime()
3069
3069
3070
3070
for (const int64_t & id : setKeyPool)
3071
3071
{
3072
- if (!walletdb.ReadPool (id, keypool))
3072
+ if (!walletdb.ReadPool (id, keypool)) {
3073
3073
throw std::runtime_error (std::string (__func__) + " : read failed" );
3074
- if (keypool.fInternal && keypool.nTime < oldest_internal)
3074
+ }
3075
+ if (keypool.fInternal && keypool.nTime < oldest_internal) {
3075
3076
oldest_internal = keypool.nTime ;
3076
- else if (!keypool.fInternal && keypool.nTime < oldest_external)
3077
+ }
3078
+ else if (!keypool.fInternal && keypool.nTime < oldest_external) {
3077
3079
oldest_external = keypool.nTime ;
3080
+ }
3081
+ if (oldest_internal != now && oldest_external != now) {
3082
+ break ;
3083
+ }
3078
3084
}
3079
3085
return std::max (oldest_internal, oldest_external);
3080
3086
}
You can’t perform that action at this time.
0 commit comments