mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-18 11:30:44 +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:
@@ -432,9 +432,8 @@ std::pair<CMutableTransaction, CAmount> TestChain100Setup::CreateValidTransactio
|
||||
std::map<COutPoint, Coin> input_coins;
|
||||
CAmount inputs_amount{0};
|
||||
for (const auto& outpoint_to_spend : inputs) {
|
||||
// - Use GetCoin to properly populate utxo_to_spend,
|
||||
Coin utxo_to_spend;
|
||||
assert(coins_cache.GetCoin(outpoint_to_spend, utxo_to_spend));
|
||||
// Use GetCoin to properly populate utxo_to_spend
|
||||
auto utxo_to_spend{coins_cache.GetCoin(outpoint_to_spend).value()};
|
||||
input_coins.insert({outpoint_to_spend, utxo_to_spend});
|
||||
inputs_amount += utxo_to_spend.out.nValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user