diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2021-03-17 10:52:16 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2021-03-17 12:17:33 +0100 |
commit | a9d1b40d53ec417eefbe767aa66701ef8e1801d5 (patch) | |
tree | e7a827d8f9143a83227ccb90085214b4449bbfd5 /src/validation.h | |
parent | 993ecafa5eb7f87574e2befc0e2057d4662a7f56 (diff) | |
parent | ebc4ab721b0371c0ef217c0f5bd7d42613e951e6 (diff) | |
download | bitcoin-a9d1b40d53ec417eefbe767aa66701ef8e1801d5.tar.xz |
Merge #21415: refactor: remove Optional & nullopt
ebc4ab721b0371c0ef217c0f5bd7d42613e951e6 refactor: post Optional<> removal cleanups (fanquake)
57e980d13ca488031bde6ef197cf34d493d36796 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 ebc4ab721b0371c0ef217c0f5bd7d42613e951e6: patch looks correct
jnewbery:
utACK ebc4ab721b0371c0ef217c0f5bd7d42613e951e6
laanwj:
Code review ACK ebc4ab721b0371c0ef217c0f5bd7d42613e951e6
Tree-SHA512: 550fbeef09b9d35ddefaa805d1755c18c8fd499c4b0f77ebfece8c20296a7abd1cf6c699e2261f92fe3552deeb7555ec2a2287ffe3ab9e98bb9f8612a4d43be3
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/validation.h b/src/validation.h index ea783ddcd1..2ff5f4ac87 100644 --- a/src/validation.h +++ b/src/validation.h @@ -17,7 +17,6 @@ #include <crypto/common.h> // for ReadLE64 #include <fs.h> #include <node/utxo_snapshot.h> -#include <optional.h> #include <policy/feerate.h> #include <protocol.h> // For CMessageHeader::MessageStartChars #include <script/script_error.h> @@ -32,6 +31,7 @@ #include <atomic> #include <map> #include <memory> +#include <optional> #include <set> #include <stdint.h> #include <string> @@ -205,8 +205,7 @@ struct MempoolAcceptResult { /** Constructor for failure case */ explicit MempoolAcceptResult(TxValidationState state) - : m_result_type(ResultType::INVALID), - m_state(state), m_replaced_transactions(nullopt), m_base_fees(nullopt) { + : m_result_type(ResultType::INVALID), m_state(state) { Assume(!state.IsValid()); // Can be invalid or error } @@ -924,7 +923,7 @@ public: bool IsSnapshotActive() const; - Optional<uint256> SnapshotBlockhash() const; + std::optional<uint256> SnapshotBlockhash() const; //! Is there a snapshot in use and has it been fully validated? bool IsSnapshotValidated() const { return m_snapshot_validated; } |