Raven Core
3.0.0
P2P Digital Currency
|
Go to the source code of this file.
Namespaces | |
Consensus | |
Functions | |
bool | CheckTransaction (const CTransaction &tx, CValidationState &state, bool fCheckDuplicateInputs=true) |
Transaction validation functions. More... | |
bool | Consensus::CheckTxInputs (const CTransaction &tx, CValidationState &state, const CCoinsViewCache &inputs, int nSpendHeight, CAmount &txfee) |
Check whether all inputs of this transaction are valid (no double spends and amounts) This does not modify the UTXO set. More... | |
bool | Consensus::CheckTxAssets (const CTransaction &tx, CValidationState &state, const CCoinsViewCache &inputs, CAssetsCache *assetCache, bool fCheckMempool, std::vector< std::pair< std::string, uint256 > > &vPairReissueAssets, const bool fRunningUnitTests=false, std::set< CMessage > *setMessages=nullptr, int64_t nBlocktime=0) |
RVN START. More... | |
unsigned int | GetLegacySigOpCount (const CTransaction &tx) |
Auxiliary functions for transaction validation (ideally should not be exposed) More... | |
unsigned int | GetP2SHSigOpCount (const CTransaction &tx, const CCoinsViewCache &mapInputs) |
Count ECDSA signature operations in pay-to-script-hash inputs. More... | |
int64_t | GetTransactionSigOpCost (const CTransaction &tx, const CCoinsViewCache &inputs, int flags) |
Compute total signature operation cost of a transaction. More... | |
bool | IsFinalTx (const CTransaction &tx, int nBlockHeight, int64_t nBlockTime) |
Check if transaction is final and can be included in a block with the specified height and time. More... | |
std::pair< int, int64_t > | CalculateSequenceLocks (const CTransaction &tx, int flags, std::vector< int > *prevHeights, const CBlockIndex &block) |
Calculates the block height and previous block's median time past at which the transaction will be considered final in the context of BIP 68. More... | |
bool | EvaluateSequenceLocks (const CBlockIndex &block, std::pair< int, int64_t > lockPair) |
bool | SequenceLocks (const CTransaction &tx, int flags, std::vector< int > *prevHeights, const CBlockIndex &block) |
Check if transaction is final per BIP 68 sequence numbers and can be included in a block. More... | |
std::pair<int, int64_t> CalculateSequenceLocks | ( | const CTransaction & | tx, |
int | flags, | ||
std::vector< int > * | prevHeights, | ||
const CBlockIndex & | block | ||
) |
Calculates the block height and previous block's median time past at which the transaction will be considered final in the context of BIP 68.
Also removes from the vector of input heights any entries which did not correspond to sequence locked inputs as they do not affect the calculation.
Definition at line 39 of file tx_verify.cpp.
bool CheckTransaction | ( | const CTransaction & | tx, |
CValidationState & | state, | ||
bool | fCheckDuplicateInputs = true |
||
) |
Transaction validation functions.
Context-independent validity checks
RVN START
RVN END
RVN START
RVN END
RVN START
Verify the reissue assets data
Verify the reissue assets data
Verify the unique assets data
Verify the msg channel assets data
Verify the qualifier channel assets data
Verify the restricted assets data.
RVN END
Definition at line 168 of file tx_verify.cpp.
bool EvaluateSequenceLocks | ( | const CBlockIndex & | block, |
std::pair< int, int64_t > | lockPair | ||
) |
Definition at line 101 of file tx_verify.cpp.
unsigned int GetLegacySigOpCount | ( | const CTransaction & | tx | ) |
Auxiliary functions for transaction validation (ideally should not be exposed)
Count ECDSA signature operations the old-fashioned (pre-0.6) way
Definition at line 116 of file tx_verify.cpp.
unsigned int GetP2SHSigOpCount | ( | const CTransaction & | tx, |
const CCoinsViewCache & | mapInputs | ||
) |
Count ECDSA signature operations in pay-to-script-hash inputs.
[in] | mapInputs | Map of previous transactions that have outputs we're spending |
Definition at line 130 of file tx_verify.cpp.
int64_t GetTransactionSigOpCost | ( | const CTransaction & | tx, |
const CCoinsViewCache & | inputs, | ||
int | flags | ||
) |
Compute total signature operation cost of a transaction.
[in] | tx | Transaction for which we are computing the cost |
[in] | inputs | Map of previous transactions that have outputs we're spending |
[out] | flags | Script verification flags |
Definition at line 147 of file tx_verify.cpp.
bool IsFinalTx | ( | const CTransaction & | tx, |
int | nBlockHeight, | ||
int64_t | nBlockTime | ||
) |
Check if transaction is final and can be included in a block with the specified height and time.
Consensus critical.
Definition at line 26 of file tx_verify.cpp.
bool SequenceLocks | ( | const CTransaction & | tx, |
int | flags, | ||
std::vector< int > * | prevHeights, | ||
const CBlockIndex & | block | ||
) |
Check if transaction is final per BIP 68 sequence numbers and can be included in a block.
Consensus critical. Takes as input a list of heights at which tx's inputs (in order) confirmed.
Definition at line 111 of file tx_verify.cpp.