![]() |
Bitcoin ABC
0.26.3
P2P Digital Currency
|
#include <compressor.h>
#include <memusage.h>
#include <primitives/blockhash.h>
#include <serialize.h>
#include <util/hasher.h>
#include <cassert>
#include <cstdint>
#include <functional>
#include <unordered_map>
Go to the source code of this file.
Classes | |
class | Coin |
A UTXO entry. More... | |
struct | CCoinsCacheEntry |
A Coin in one level of the coins database caching hierarchy. More... | |
class | CCoinsViewCursor |
Cursor for iterating over CoinsView state. More... | |
class | CCoinsView |
Abstract view on the open txout dataset. More... | |
class | CCoinsViewBacked |
CCoinsView backed by another CCoinsView. More... | |
class | CCoinsViewCache |
CCoinsView that adds a memory cache for transactions to another CCoinsView. More... | |
class | CCoinsViewErrorCatcher |
This is a minimally invasive approach to shutdown on LevelDB read errors from the chainstate, while keeping user interface out of the common library, which is shared between bitcoind, and bitcoin-qt and non-server tools. More... | |
Typedefs | |
typedef std::unordered_map< COutPoint, CCoinsCacheEntry, SaltedOutpointHasher > | CCoinsMap |
Functions | |
void | AddCoins (CCoinsViewCache &cache, const CTransaction &tx, int nHeight, bool check=false) |
Utility function to add all of a transaction's outputs to a cache. More... | |
const Coin & | AccessByTxid (const CCoinsViewCache &cache, const TxId &txid) |
Utility function to find any unspent output with a given txid. More... | |
typedef std::unordered_map<COutPoint, CCoinsCacheEntry, SaltedOutpointHasher> CCoinsMap |
const Coin& AccessByTxid | ( | const CCoinsViewCache & | cache, |
const TxId & | txid | ||
) |
Utility function to find any unspent output with a given txid.
This function can be quite expensive because in the event of a transaction which is not found in the cache, it can cause up to MAX_OUTPUTS_PER_BLOCK lookups to database, so it should be used with care.
Definition at line 331 of file coins.cpp.
void AddCoins | ( | CCoinsViewCache & | cache, |
const CTransaction & | tx, | ||
int | nHeight, | ||
bool | check = false |
||
) |
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.
Definition at line 152 of file coins.cpp.