Merge #21415: refactor: remove Optional & nullopt

ebc4ab721b refactor: post Optional<> removal cleanups (fanquake)
57e980d13c scripted-diff: remove Optional & nullopt (fanquake)

Pull request description:

  Same rationale & motivation as #21404, which turned out to be quite low in the number of potential conflicts. Lets see what the bot has to say here.

ACKs for top commit:
  practicalswift:
    cr ACK ebc4ab721b: patch looks correct
  jnewbery:
    utACK ebc4ab721b
  laanwj:
    Code review ACK ebc4ab721b

Tree-SHA512: 550fbeef09b9d35ddefaa805d1755c18c8fd499c4b0f77ebfece8c20296a7abd1cf6c699e2261f92fe3552deeb7555ec2a2287ffe3ab9e98bb9f8612a4d43be3
This commit is contained in:
Wladimir J. van der Laan
2021-03-17 10:52:16 +01:00
51 changed files with 184 additions and 194 deletions

View File

@@ -23,7 +23,6 @@
#include <logging/timer.h>
#include <node/coinstats.h>
#include <node/ui_interface.h>
#include <optional.h>
#include <policy/policy.h>
#include <policy/settings.h>
#include <pow.h>
@@ -50,6 +49,7 @@
#include <validationinterface.h>
#include <warnings.h>
#include <optional>
#include <string>
#include <boost/algorithm/string/replace.hpp>
@@ -5175,7 +5175,7 @@ double GuessVerificationProgress(const ChainTxData& data, const CBlockIndex *pin
return std::min<double>(pindex->nChainTx / fTxTotal, 1.0);
}
Optional<uint256> ChainstateManager::SnapshotBlockhash() const {
std::optional<uint256> ChainstateManager::SnapshotBlockhash() const {
LOCK(::cs_main);
if (m_active_chainstate != nullptr &&
!m_active_chainstate->m_from_snapshot_blockhash.IsNull()) {