diff --git a/src/txmempool.cpp b/src/txmempool.cpp index cbfda7b61b..54c3c10316 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -972,7 +972,7 @@ std::optional CTxMemPool::GetIter(const uint256& txid) const { auto it = mapTx.find(txid); if (it != mapTx.end()) return it; - return {}; + return std::nullopt; } CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set& hashes) const diff --git a/src/validation.cpp b/src/validation.cpp index f23423d455..ef567434a4 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -5545,7 +5545,7 @@ std::optional ChainstateManager::SnapshotBlockhash() const { // If a snapshot chainstate exists, it will always be our active. return m_active_chainstate->m_from_snapshot_blockhash; } - return {}; + return std::nullopt; } std::vector ChainstateManager::GetAll()