diff --git a/src/psbt.h b/src/psbt.h --- a/src/psbt.h +++ b/src/psbt.h @@ -311,7 +311,7 @@ * A version of CTransaction with the PSBT format. */ struct PartiallySignedTransaction { - boost::optional tx; + Optional tx; std::vector inputs; std::vector outputs; std::map, std::vector> unknown; diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -651,7 +652,7 @@ EXCLUSIVE_LOCKS_REQUIRED(cs); /** Returns an iterator to the given txid, if found */ - boost::optional GetIter(const TxId &txid) const + Optional GetIter(const TxId &txid) const EXCLUSIVE_LOCKS_REQUIRED(cs); /** diff --git a/src/txmempool.cpp b/src/txmempool.cpp --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -193,7 +193,7 @@ // GetMemPoolParents() is only valid for entries in the mempool, so we // iterate mapTx to find parents. for (const CTxIn &in : tx.vin) { - boost::optional piter = GetIter(in.prevout.GetTxId()); + Optional piter = GetIter(in.prevout.GetTxId()); if (!piter) { continue; } @@ -1003,13 +1003,12 @@ return it == mapNextTx.end() ? nullptr : it->second; } -boost::optional -CTxMemPool::GetIter(const TxId &txid) const { +Optional CTxMemPool::GetIter(const TxId &txid) const { auto it = mapTx.find(txid); if (it != mapTx.end()) { return it; } - return boost::optional{}; + return Optional{}; } CTxMemPool::setEntries diff --git a/src/wallet/coincontrol.h b/src/wallet/coincontrol.h --- a/src/wallet/coincontrol.h +++ b/src/wallet/coincontrol.h @@ -5,11 +5,10 @@ #ifndef BITCOIN_WALLET_COINCONTROL_H #define BITCOIN_WALLET_COINCONTROL_H +#include #include #include -#include - const int DEFAULT_MIN_DEPTH = 0; const int DEFAULT_MAX_DEPTH = 9999999; @@ -18,7 +17,7 @@ public: CTxDestination destChange; //! Override the default change type if set, ignored if destChange is set - boost::optional m_change_type; + Optional m_change_type; //! If false, allows unselected inputs, but requires all selected inputs be //! used bool fAllowOtherInputs; @@ -27,9 +26,9 @@ //! Override automatic min/max checks on fee, m_feerate must be set if true bool fOverrideFeeRate; //! Override the wallet's m_pay_tx_fee if set - boost::optional m_feerate; + Optional m_feerate; //! Override the default confirmation target if set - boost::optional m_confirm_target; + Optional m_confirm_target; //! Avoid partial use of funds sent to a given address bool m_avoid_partial_spends; //! Forbids inclusion of dirty (previously used) addresses diff --git a/src/wallet/coinselection.cpp b/src/wallet/coinselection.cpp --- a/src/wallet/coinselection.cpp +++ b/src/wallet/coinselection.cpp @@ -4,11 +4,10 @@ #include +#include #include #include -#include - // Descending order comparator struct { bool operator()(const OutputGroup &a, const OutputGroup &b) const { @@ -254,7 +253,7 @@ nValueRet = Amount::zero(); // List of values less than target - boost::optional lowest_larger; + Optional lowest_larger; std::vector applicable_groups; Amount nTotalLower = Amount::zero();