mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge b30a1f3e39 into merged_master (Bitcoin PR #18052)
This commit is contained in:
commit
3f02ec4810
1 changed files with 3 additions and 1 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include <interfaces/wallet.h>
|
||||
#include <key.h>
|
||||
#include <key_io.h>
|
||||
#include <optional.h>
|
||||
#include <policy/fees.h>
|
||||
#include <policy/policy.h>
|
||||
#include <primitives/block.h>
|
||||
|
|
@ -4636,7 +4637,8 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain,
|
|||
|
||||
// No need to read and scan block if block was created before
|
||||
// our wallet birthday (as adjusted for block time variability)
|
||||
Optional<int64_t> time_first_key;
|
||||
// The way the 'time_first_key' is initialized is just a workaround for the gcc bug #47679 since version 4.6.0.
|
||||
Optional<int64_t> time_first_key = MakeOptional(false, int64_t());;
|
||||
for (auto spk_man : walletInstance->GetAllScriptPubKeyMans()) {
|
||||
int64_t time = spk_man->GetTimeFirstKey();
|
||||
if (!time_first_key || time < *time_first_key) time_first_key = time;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue