In #21415 we decided to return std::optional
rather than {}
for
uninitialized values. This PR replaces the two remaining usages of {}
with std::nullopt
.
As a side-effect, this also quells the spurious GCC 10.2.x warning that we’ve had reported quite a few times. i.e #21318, #21248, #20797.
0txmempool.cpp: In member function ‘CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<uint256>&) const’:
1txmempool.cpp:898:13: warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2 898 | return {};
3 | ^