Changeset View
Changeset View
Standalone View
Standalone View
src/test/coins_tests.cpp
Show First 20 Lines • Show All 379 Lines • ▼ Show 20 Lines | for (int64_t i = 0; i < NUM_SIMULATION_ITERATIONS; i++) { | ||||
// Update the expected result to know about the new output coins | // Update the expected result to know about the new output coins | ||||
assert(tx.vout.size() == 1); | assert(tx.vout.size() == 1); | ||||
const COutPoint outpoint(tx.GetId(), 0); | const COutPoint outpoint(tx.GetId(), 0); | ||||
result[outpoint] = | result[outpoint] = | ||||
Coin(tx.vout[0], height, CTransaction(tx).IsCoinBase()); | Coin(tx.vout[0], height, CTransaction(tx).IsCoinBase()); | ||||
// Call UpdateCoins on the top cache | // Call UpdateCoins on the top cache | ||||
CTxUndo undo; | CTxUndo undo; | ||||
UpdateCoins(CTransaction(tx), *(stack.back()), undo, height); | UpdateCoins(*(stack.back()), CTransaction(tx), undo, height); | ||||
// Update the utxo set for future spends | // Update the utxo set for future spends | ||||
utxoset.insert(outpoint); | utxoset.insert(outpoint); | ||||
// Track this tx and undo info to use later | // Track this tx and undo info to use later | ||||
utxoData.emplace(outpoint, | utxoData.emplace(outpoint, | ||||
std::make_tuple(CTransaction(tx), undo, old_coin)); | std::make_tuple(CTransaction(tx), undo, old_coin)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 501 Lines • Show Last 20 Lines |