mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
scripted-diff: remove Optional & nullopt
-BEGIN VERIFY SCRIPT-
git rm src/optional.h
sed -i -e 's/Optional</std::optional</g' $(git grep -l 'Optional<' src)
sed -i -e 's/{nullopt}/{std::nullopt}/g' $(git grep -l 'nullopt' src)
sed -i -e 's/ nullopt;/ std::nullopt;/g' $(git grep -l 'nullopt' src)
sed -i -e 's/ nullopt)/ std::nullopt)/g' $(git grep -l 'nullopt' src)
sed -i -e 's/(nullopt)/(std::nullopt)/g' $(git grep -l 'nullopt' src)
sed -i -e 's/ nullopt,/ std::nullopt,/g' $(git grep -l 'nullopt' src)
sed -i -e 's/? nullopt :/? std::nullopt :/g' $(git grep -l 'nullopt' src)
sed -i -e 's/: nullopt}/: std::nullopt}/g' $(git grep -l 'nullopt' src)
sed -i -e '/optional.h \\/d' src/Makefile.am
sed -i -e '/#include <optional.h>/d' src/test/fuzz/autofile.cpp src/test/fuzz/buffered_file.cpp src/test/fuzz/node_eviction.cpp
sed -i -e 's/#include <optional.h>/#include <optional>/g' $(git grep -l '#include <optional.h>' src)
-END VERIFY SCRIPT-
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include <crypto/common.h> // for ReadLE64
|
||||
#include <fs.h>
|
||||
#include <node/utxo_snapshot.h>
|
||||
#include <optional.h>
|
||||
#include <optional>
|
||||
#include <policy/feerate.h>
|
||||
#include <protocol.h> // For CMessageHeader::MessageStartChars
|
||||
#include <script/script_error.h>
|
||||
@@ -206,7 +206,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_state(state), m_replaced_transactions(std::nullopt), m_base_fees(std::nullopt) {
|
||||
Assume(!state.IsValid()); // Can be invalid or error
|
||||
}
|
||||
|
||||
@@ -924,7 +924,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; }
|
||||
|
||||
Reference in New Issue
Block a user