Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show All 13 Lines | |||||
#include <amount.h> | #include <amount.h> | ||||
#include <blockfileinfo.h> | #include <blockfileinfo.h> | ||||
#include <coins.h> | #include <coins.h> | ||||
#include <consensus/consensus.h> | #include <consensus/consensus.h> | ||||
#include <flatfile.h> | #include <flatfile.h> | ||||
#include <fs.h> | #include <fs.h> | ||||
#include <protocol.h> // For CMessageHeader::MessageMagic | #include <protocol.h> // For CMessageHeader::MessageMagic | ||||
#include <script/script_error.h> | #include <script/script_error.h> | ||||
#include <script/script_metrics.h> | |||||
#include <sync.h> | #include <sync.h> | ||||
#include <versionbits.h> | #include <versionbits.h> | ||||
#include <algorithm> | #include <algorithm> | ||||
#include <atomic> | #include <atomic> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <exception> | #include <exception> | ||||
#include <map> | #include <map> | ||||
▲ Show 20 Lines • Show All 498 Lines • ▼ Show 20 Lines | |||||
private: | private: | ||||
CScript scriptPubKey; | CScript scriptPubKey; | ||||
Amount amount; | Amount amount; | ||||
const CTransaction *ptxTo; | const CTransaction *ptxTo; | ||||
unsigned int nIn; | unsigned int nIn; | ||||
uint32_t nFlags; | uint32_t nFlags; | ||||
bool cacheStore; | bool cacheStore; | ||||
ScriptError error; | ScriptError error; | ||||
ScriptExecutionMetrics metrics; | |||||
PrecomputedTransactionData txdata; | PrecomputedTransactionData txdata; | ||||
public: | public: | ||||
CScriptCheck() | CScriptCheck() | ||||
: amount(), ptxTo(nullptr), nIn(0), nFlags(0), cacheStore(false), | : amount(), ptxTo(nullptr), nIn(0), nFlags(0), cacheStore(false), | ||||
error(ScriptError::UNKNOWN), txdata() {} | error(ScriptError::UNKNOWN), txdata() {} | ||||
CScriptCheck(const CScript &scriptPubKeyIn, const Amount amountIn, | CScriptCheck(const CScript &scriptPubKeyIn, const Amount amountIn, | ||||
Show All 13 Lines | void swap(CScriptCheck &check) { | ||||
std::swap(nIn, check.nIn); | std::swap(nIn, check.nIn); | ||||
std::swap(nFlags, check.nFlags); | std::swap(nFlags, check.nFlags); | ||||
std::swap(cacheStore, check.cacheStore); | std::swap(cacheStore, check.cacheStore); | ||||
std::swap(error, check.error); | std::swap(error, check.error); | ||||
std::swap(txdata, check.txdata); | std::swap(txdata, check.txdata); | ||||
} | } | ||||
ScriptError GetScriptError() const { return error; } | ScriptError GetScriptError() const { return error; } | ||||
ScriptExecutionMetrics GetScriptExecutionMetrics() const { return metrics; } | |||||
}; | }; | ||||
/** Functions for disk access for blocks */ | /** Functions for disk access for blocks */ | ||||
bool ReadBlockFromDisk(CBlock &block, const FlatFilePos &pos, | bool ReadBlockFromDisk(CBlock &block, const FlatFilePos &pos, | ||||
const Consensus::Params ¶ms); | const Consensus::Params ¶ms); | ||||
bool ReadBlockFromDisk(CBlock &block, const CBlockIndex *pindex, | bool ReadBlockFromDisk(CBlock &block, const CBlockIndex *pindex, | ||||
const Consensus::Params ¶ms); | const Consensus::Params ¶ms); | ||||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |