mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-10 12:43:30 +01:00
Add height, depth, and hash methods to the Chain interface
And use them to remove uses of chainActive and mapBlockIndex in wallet code This commit does not change behavior. Co-authored-by: Ben Woosley <ben.woosley@gmail.com>
This commit is contained in:
17
src/optional.h
Normal file
17
src/optional.h
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) 2017 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_OPTIONAL_H
|
||||
#define BITCOIN_OPTIONAL_H
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
//! Substitute for C++17 std::optional
|
||||
template <typename T>
|
||||
using Optional = boost::optional<T>;
|
||||
|
||||
//! Substitute for C++17 std::nullopt
|
||||
static auto& nullopt = boost::none;
|
||||
|
||||
#endif // BITCOIN_OPTIONAL_H
|
||||
Reference in New Issue
Block a user