mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-24 14:40:12 +01:00
Remove unused MakeOptional
The only use was to work around a compiler warning in an ancient compiler, which we no longer support.
This commit is contained in:
@@ -4055,8 +4055,7 @@ std::shared_ptr<CWallet> CWallet::Create(interfaces::Chain& chain, const std::st
|
||||
|
||||
// No need to read and scan block if block was created before
|
||||
// our wallet birthday (as adjusted for block time variability)
|
||||
// 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());;
|
||||
Optional<int64_t> time_first_key;
|
||||
for (auto spk_man : walletInstance->GetAllScriptPubKeyMans()) {
|
||||
int64_t time = spk_man->GetTimeFirstKey();
|
||||
if (!time_first_key || time < *time_first_key) time_first_key = time;
|
||||
|
||||
Reference in New Issue
Block a user