5#ifndef BITCOIN_TEST_UTIL_COINS_H
6#define BITCOIN_TEST_UTIL_COINS_H
34 return os <<
strprintf(
"Coin(spent=%d, coinbase=%d, height=%d, value=%d, scriptPubKey=%s)",
CCoinsView that adds a memory cache for transactions to another CCoinsView.
An outpoint - a combination of a transaction hash and an index n into its vout.
CTxOut out
unspent transaction output
bool IsSpent() const
Either this coin never existed (see e.g.
bool fCoinBase
whether containing transaction was a coinbase
uint32_t nHeight
at which height this containing transaction was included in the active block chain
std::string HexStr(const std::span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.
bool operator==(const Coin &a, const Coin &b)
Strict equality, including fields of spent coins.
COutPoint AddTestCoin(FastRandomContext &rng, CCoinsViewCache &coins_view)
Create a Coin with DynamicMemoryUsage of 80 bytes and add it to the given view.
std::ostream & operator<<(std::ostream &os, const Coin &coin)
Printed when a coin comparison fails.