From 57e980d13ca488031bde6ef197cf34d493d36796 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 15 Mar 2021 10:41:30 +0800 Subject: scripted-diff: remove Optional & nullopt -BEGIN VERIFY SCRIPT- git rm src/optional.h sed -i -e 's/Optional/d' src/test/fuzz/autofile.cpp src/test/fuzz/buffered_file.cpp src/test/fuzz/node_eviction.cpp sed -i -e 's/#include /#include /g' $(git grep -l '#include ' src) -END VERIFY SCRIPT- --- src/interfaces/chain.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/interfaces') diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index ebc5466173..50294ee375 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_INTERFACES_CHAIN_H #define BITCOIN_INTERFACES_CHAIN_H -#include // For Optional and nullopt +#include // For Optional and nullopt #include // For CTransactionRef #include // For util::SettingsValue @@ -94,7 +94,7 @@ public: //! Get current chain height, not including genesis block (returns 0 if //! chain only contains genesis block, nullopt if chain does not contain //! any blocks) - virtual Optional getHeight() = 0; + virtual std::optional getHeight() = 0; //! Get block hash. Height must be valid or this function will abort. virtual uint256 getBlockHash(int height) = 0; @@ -109,7 +109,7 @@ public: //! Return height of the highest block on chain in common with the locator, //! which will either be the original block used to create the locator, //! or one of its ancestors. - virtual Optional findLocatorFork(const CBlockLocator& locator) = 0; + virtual std::optional findLocatorFork(const CBlockLocator& locator) = 0; //! Check if transaction will be final given chain height current time. virtual bool checkFinalTx(const CTransaction& tx) = 0; @@ -154,7 +154,7 @@ public: //! Return true if data is available for all blocks in the specified range //! of blocks. This checks all blocks that are ancestors of block_hash in //! the height range from min_height to max_height, inclusive. - virtual bool hasBlocks(const uint256& block_hash, int min_height = 0, Optional max_height = {}) = 0; + virtual bool hasBlocks(const uint256& block_hash, int min_height = 0, std::optional max_height = {}) = 0; //! Check if transaction is RBF opt in. virtual RBFTransactionState isRBFOptIn(const CTransaction& tx) = 0; -- cgit v1.2.3