PIVX Core  5.6.99
P2P Digital Currency
sapling_validation.h
Go to the documentation of this file.
1 // Copyright (c) 2016-2020 The ZCash developers
2 // Copyright (c) 2020-2021 The PIVX Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef PIVX_SAPLING_SAPLING_VALIDATION_H
7 #define PIVX_SAPLING_SAPLING_VALIDATION_H
8 
9 #include "chainparams.h"
10 
11 class CTransaction;
12 class CValidationState;
13 
14 namespace SaplingValidation {
15 
17 // Note: for v3+, if the tx has no shielded data, this method returns true.
18 // Note2: This function only performs shielded data related checks, it does NOT checks regular inputs and outputs.
19 bool CheckTransaction(const CTransaction& tx, CValidationState& state, CAmount& nValueOut);
21 
23 // Note: if v5 upgrade wasn't enforced, this method returns true without performing any check.
25  const CChainParams &chainparams, int nHeight, bool isMined,
26  bool sInitBlockDownload);
27 
28 }; // End SaplingValidation namespace
29 
30 #endif // PIVX_SAPLING_SAPLING_VALIDATION_H
int64_t CAmount
Amount in PIV (Can be negative)
Definition: amount.h:13
CChainParams defines various tweakable parameters of a given instance of the PIVX system.
Definition: chainparams.h:43
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
bool CheckTransactionWithoutProofVerification(const CTransaction &tx, CValidationState &state, CAmount &nValueOut)
bool CheckTransaction(const CTransaction &tx, CValidationState &state, CAmount &nValueOut)
Context-independent validity checks.
bool ContextualCheckTransaction(const CTransaction &tx, CValidationState &state, const CChainParams &chainparams, const int nHeight, const bool isMined, bool isInitBlockDownload)
Check a transaction contextually against a set of consensus rules valid at a given block height.