Bitcoin ABC 0.30.7
P2P Digital Currency
tx_verify.h
Go to the documentation of this file.
1// Copyright (c) 2018-2020 The Bitcoin developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_CONSENSUS_TX_VERIFY_H
6#define BITCOIN_CONSENSUS_TX_VERIFY_H
7
8#include <cstdint>
9#include <vector>
10
11struct Amount;
12class CBlockIndex;
13class CCoinsViewCache;
14class CTransaction;
16
17namespace Consensus {
18struct Params;
19
27bool CheckTxInputs(const CTransaction &tx, TxValidationState &state,
28 const CCoinsViewCache &inputs, int nSpendHeight,
29 Amount &txfee);
30
31} // namespace Consensus
32
40 const CTransaction &tx,
41 TxValidationState &state, int nHeight,
42 int64_t nMedianTimePast);
43
50std::pair<int, int64_t> CalculateSequenceLocks(const CTransaction &tx,
51 int flags,
52 std::vector<int> &prevHeights,
53 const CBlockIndex &block);
54
55bool EvaluateSequenceLocks(const CBlockIndex &block,
56 std::pair<int, int64_t> lockPair);
57
63bool SequenceLocks(const CTransaction &tx, int flags,
64 std::vector<int> &prevHeights, const CBlockIndex &block);
65
66#endif // BITCOIN_CONSENSUS_TX_VERIFY_H
int flags
Definition: bitcoin-tx.cpp:541
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:19
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: blockindex.h:25
CCoinsView that adds a memory cache for transactions to another CCoinsView.
Definition: coins.h:221
The basic transaction that is broadcasted on the network and contained in blocks.
Definition: transaction.h:192
unsigned int nHeight
bool CheckTxInputs(const CTransaction &tx, TxValidationState &state, const CCoinsViewCache &inputs, int nSpendHeight, Amount &txfee)
Check whether all inputs of this transaction are valid (no double spends and amounts).
Definition: tx_verify.cpp:168
Definition: amount.h:19
Parameters that influence chain consensus.
Definition: params.h:34
bool EvaluateSequenceLocks(const CBlockIndex &block, std::pair< int, int64_t > lockPair)
Definition: tx_verify.cpp:150
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 co...
Definition: tx_verify.cpp:78
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.
Definition: tx_verify.cpp:161
bool ContextualCheckTransaction(const Consensus::Params &params, const CTransaction &tx, TxValidationState &state, int nHeight, int64_t nMedianTimePast)
Context dependent validity checks for non coinbase transactions.
Definition: tx_verify.cpp:41