PIVX Core  5.6.99
P2P Digital Currency
tx_verify.h
Go to the documentation of this file.
1 // Copyright (c) 2017-2017 The Bitcoin Core 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 PIVX_CONSENSUS_TX_VERIFY_H
6 #define PIVX_CONSENSUS_TX_VERIFY_H
7 
8 #include "chainparams.h"
10 
11 #include <stdint.h>
12 #include <vector>
13 
14 class CBlockIndex;
15 class CChainParams;
16 class CCoinsViewCache;
17 class CValidationState;
18 
22 bool CheckTransaction(const CTransaction& tx, CValidationState& state, bool fColdStakingActive);
24 bool ContextualCheckTransaction(const CTransactionRef& tx, CValidationState& state, const CChainParams& chainparams, int nHeight, bool isMined, bool fIBD);
25 
31 unsigned int GetLegacySigOpCount(const CTransaction& tx);
32 
40 unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& mapInputs);
41 
46 bool IsFinalTx(const CTransactionRef& tx, int nBlockHeight, int64_t nBlockTime = 0);
47 
48 #endif // PIVX_CONSENSUS_TX_VERIFY_H
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:139
CChainParams defines various tweakable parameters of a given instance of the PIVX system.
Definition: chainparams.h:43
CCoinsView that adds a memory cache for transactions to another CCoinsView.
Definition: coins.h:283
The basic transaction that is broadcasted on the network and contained in blocks.
Definition: transaction.h:244
Capture information about block/transaction validation.
Definition: validation.h:24
std::shared_ptr< const CTransaction > CTransactionRef
Definition: transaction.h:456
unsigned int GetP2SHSigOpCount(const CTransaction &tx, const CCoinsViewCache &mapInputs)
Count ECDSA signature operations in pay-to-script-hash inputs.
Definition: tx_verify.cpp:39
bool CheckTransaction(const CTransaction &tx, CValidationState &state, bool fColdStakingActive)
Transaction validation functions.
Definition: tx_verify.cpp:54
bool ContextualCheckTransaction(const CTransactionRef &tx, CValidationState &state, const CChainParams &chainparams, int nHeight, bool isMined, bool fIBD)
Context-dependent validity checks.
Definition: tx_verify.cpp:134
bool IsFinalTx(const CTransactionRef &tx, int nBlockHeight, int64_t nBlockTime=0)
Check if transaction is final and can be included in a block with the specified height and time.
Definition: tx_verify.cpp:12
unsigned int GetLegacySigOpCount(const CTransaction &tx)
Count ECDSA signature operations the old-fashioned (pre-0.6) way.
Definition: tx_verify.cpp:27