Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

coins.cpp File Reference
#include <coins.h>
#include <consensus/consensus.h>
#include <random.h>
+ Include dependency graph for coins.cpp:

Go to the source code of this file.

Functions

void AddCoins (CCoinsViewCache &cache, const CTransaction &tx, int nHeight, bool check)
 Utility function to add all of a transaction's outputs to a cache. More...
 
const CoinAccessByTxid (const CCoinsViewCache &view, const uint256 &txid)
 Utility function to find any unspent output with a given txid. More...
 

Variables

static const Coin coinEmpty
 
static const size_t MAX_OUTPUTS_PER_BLOCK = MaxBlockSize(true) / ::GetSerializeSize(CTxOut(), SER_NETWORK, PROTOCOL_VERSION)
 

Function Documentation

◆ AccessByTxid()

const Coin& AccessByTxid ( const CCoinsViewCache view,
const uint256 txid 
)

Utility function to find any unspent output with a given txid.

Definition at line 249 of file coins.cpp.

References CCoinsViewCache::AccessCoin(), coinEmpty, Coin::IsSpent(), MAX_OUTPUTS_PER_BLOCK, and COutPoint::n.

Referenced by ApplyTxInUndo(), GetTransaction(), and gettxoutproof().

◆ AddCoins()

void AddCoins ( CCoinsViewCache cache,
const CTransaction tx,
int  nHeight,
bool  check 
)

Utility function to add all of a transaction's outputs to a cache.

Definition at line 87 of file coins.cpp.

References CCoinsViewCache::AddCoin(), CTransaction::GetHash(), CCoinsViewCache::HaveCoin(), CTransaction::IsCoinBase(), and CTransaction::vout.

Referenced by CChainState::RollforwardBlock(), SetupDummyInputs(), and UpdateCoins().

Variable Documentation

◆ coinEmpty

const Coin coinEmpty
static

Definition at line 114 of file coins.cpp.

Referenced by AccessByTxid(), and CCoinsViewCache::AccessCoin().

◆ MAX_OUTPUTS_PER_BLOCK

const size_t MAX_OUTPUTS_PER_BLOCK = MaxBlockSize(true) / ::GetSerializeSize(CTxOut(), SER_NETWORK, PROTOCOL_VERSION)
static

Definition at line 247 of file coins.cpp.

Referenced by AccessByTxid().

Released under the MIT license