Utility function to add all of a transaction's outputs to a cache. When check is false, this assumes that overwrites are only possible for coinbase transactions. When check is true, the underlying view may be queried to determine whether an addition is an overwrite.
Declared in <coins.h>
void
AddCoins(
CCoinsViewCache& cache,
CTransaction const& tx,
int nHeight,
bool check = false);
| Name | Description |
|---|---|
| cache | Cache to add the transaction's outputs to. |
| tx | Transaction whose outputs are added. |
| nHeight | Height of the block that includes the transaction. |
| check | When true, query the underlying view to detect overwrites. |