mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
refactor: Rely on returned value of GetCoin instead of parameter
Also removed the unused coin parameter of GetCoin. Co-authored-by: Andrew Toth <andrewstoth@gmail.com>
This commit is contained in:
@@ -65,10 +65,10 @@ void CCoinsViewDB::ResizeCache(size_t new_cache_size)
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<Coin> CCoinsViewDB::GetCoin(const COutPoint& outpoint, Coin& coin) const
|
||||
std::optional<Coin> CCoinsViewDB::GetCoin(const COutPoint& outpoint) const
|
||||
{
|
||||
if (m_db->Read(CoinEntry(&outpoint), coin)) return coin;
|
||||
else return std::nullopt;
|
||||
if (Coin coin; m_db->Read(CoinEntry(&outpoint), coin)) return coin;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
bool CCoinsViewDB::HaveCoin(const COutPoint &outpoint) const {
|
||||
|
||||
Reference in New Issue
Block a user