diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 28cd7084d44..01165f512fd 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -10,6 +10,7 @@ #include "clientversion.h" #include "consensus/consensus.h" #include "consensus/validation.h" +#include "optional.h" #include "validation.h" #include "policy/policy.h" #include "policy/fees.h" @@ -179,9 +180,9 @@ bool CTxMemPool::CalculateMemPoolAncestors(const CTxMemPoolEntry &entry, setEntr // GetMemPoolParents() is only valid for entries in the mempool, so we // iterate mapTx to find parents. for (unsigned int i = 0; i < tx.vin.size(); i++) { - txiter piter = mapTx.find(tx.vin[i].prevout.hash); + Optional piter = mapTx.find(tx.vin[i].prevout.hash); if (piter != mapTx.end()) { - parentHashes.insert(piter); + parentHashes.insert(*piter); if (parentHashes.size() + 1 > limitAncestorCount) { errString = strprintf("too many unconfirmed parents [limit: %u]", limitAncestorCount); return false; diff --git a/src/txmempool.h b/src/txmempool.h index de95d0afd10..e6f1d6fe1f7 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -18,6 +18,7 @@ #include "coins.h" #include "crypto/siphash.h" #include "indirectmap.h" +#include "optional.h" #include "primitives/transaction.h" #include "sync.h" #include "random.h" diff --git a/src/util.h b/src/util.h index 9d7ff0bf0fe..d6f212836c6 100644 --- a/src/util.h +++ b/src/util.h @@ -17,6 +17,7 @@ #include "compat.h" #include "fs.h" +#include "optional.h" #include "tinyformat.h" #include "utiltime.h" @@ -62,7 +63,7 @@ extern const char * const BITCOIN_PID_FILENAME; */ inline std::string _(const char* psz) { - boost::optional rv = translationInterface.Translate(psz); + Optional rv = translationInterface.Translate(psz); return rv ? (*rv) : psz; } diff --git a/src/wallet/coincontrol.h b/src/wallet/coincontrol.h index 20dcae890c1..a5d72c0c53f 100644 --- a/src/wallet/coincontrol.h +++ b/src/wallet/coincontrol.h @@ -6,6 +6,7 @@ #ifndef BITCOIN_WALLET_COINCONTROL_H #define BITCOIN_WALLET_COINCONTROL_H +#include "optional.h" #include "primitives/transaction.h" #include "dogecoin-fees.h"