refactor: Return optional of Coin in GetCoin

Leaving the parameter as well for now.

Co-authored-by: TheCharlatan <seb.kung@gmail.com>
This commit is contained in:
Lőrinc
2024-09-08 21:57:18 +02:00
parent e31bfb26c2
commit 46dfbf169b
9 changed files with 41 additions and 38 deletions

View File

@@ -851,7 +851,7 @@ public:
CCoinsViewMemPool(CCoinsView* baseIn, const CTxMemPool& mempoolIn);
/** GetCoin, returning whether it exists and is not spent. Also updates m_non_base_coins if the
* coin is not fetched from base. */
bool GetCoin(const COutPoint &outpoint, Coin &coin) const override;
std::optional<Coin> GetCoin(const COutPoint& outpoint, Coin& coin) const override;
/** Add the coins created by this transaction. These coins are only temporarily stored in
* m_temp_added and cannot be flushed to the back end. Only used for package validation. */
void PackageAddTransaction(const CTransactionRef& tx);