diff --git a/src/txmempool.cpp b/src/txmempool.cpp index faccd1ade0b..67549fc13d4 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -895,7 +895,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 96d12f10e25..d1b9efe7bac 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -5186,7 +5186,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()