Changeset View
Changeset View
Standalone View
Standalone View
src/consensus/tx_check.h
// Copyright (c) 2017-2018 The Bitcoin Core developers | // Copyright (c) 2017-2018 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_CONSENSUS_TX_CHECK_H | #ifndef BITCOIN_CONSENSUS_TX_CHECK_H | ||||
#define BITCOIN_CONSENSUS_TX_CHECK_H | #define BITCOIN_CONSENSUS_TX_CHECK_H | ||||
/** | /** | ||||
* Context-independent transaction checking code that can be called outside the | * Context-independent transaction checking code that can be called outside the | ||||
* bitcoin server and doesn't depend on chain or mempool state. Transaction | * bitcoin server and doesn't depend on chain or mempool state. Transaction | ||||
* verification code that does call server functions or depend on server state | * verification code that does call server functions or depend on server state | ||||
* belongs in tx_verify.h/cpp instead. | * belongs in tx_verify.h/cpp instead. | ||||
*/ | */ | ||||
class CTransaction; | class CTransaction; | ||||
class CValidationState; | class TxValidationState; | ||||
/** | /** | ||||
* Context-independent validity checks for coinbase and non-coinbase | * Context-independent validity checks for coinbase and non-coinbase | ||||
* transactions. | * transactions. | ||||
*/ | */ | ||||
bool CheckRegularTransaction(const CTransaction &tx, CValidationState &state); | bool CheckRegularTransaction(const CTransaction &tx, TxValidationState &state); | ||||
bool CheckCoinbase(const CTransaction &tx, CValidationState &state); | bool CheckCoinbase(const CTransaction &tx, TxValidationState &state); | ||||
#endif // BITCOIN_CONSENSUS_TX_CHECK_H | #endif // BITCOIN_CONSENSUS_TX_CHECK_H |