Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
class CConnman; | class CConnman; | ||||
class CInv; | class CInv; | ||||
class Config; | class Config; | ||||
class CScriptCheck; | class CScriptCheck; | ||||
class CTxMemPool; | class CTxMemPool; | ||||
class CTxUndo; | class CTxUndo; | ||||
class CValidationState; | class CValidationState; | ||||
struct CDiskBlockPos; | struct FlatFilePos; | ||||
struct ChainTxData; | struct ChainTxData; | ||||
struct PrecomputedTransactionData; | struct PrecomputedTransactionData; | ||||
struct LockPoints; | struct LockPoints; | ||||
#define MIN_TRANSACTION_SIZE \ | #define MIN_TRANSACTION_SIZE \ | ||||
(::GetSerializeSize(CTransaction(), SER_NETWORK, PROTOCOL_VERSION)) | (::GetSerializeSize(CTransaction(), SER_NETWORK, PROTOCOL_VERSION)) | ||||
/** Default for -whitelistrelay. */ | /** Default for -whitelistrelay. */ | ||||
▲ Show 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | bool ProcessNewBlockHeaders(const Config &config, | ||||
const std::vector<CBlockHeader> &block, | const std::vector<CBlockHeader> &block, | ||||
CValidationState &state, | CValidationState &state, | ||||
const CBlockIndex **ppindex = nullptr, | const CBlockIndex **ppindex = nullptr, | ||||
CBlockHeader *first_invalid = nullptr); | CBlockHeader *first_invalid = nullptr); | ||||
/** | /** | ||||
* Open a block file (blk?????.dat). | * Open a block file (blk?????.dat). | ||||
*/ | */ | ||||
FILE *OpenBlockFile(const CDiskBlockPos &pos, bool fReadOnly = false); | FILE *OpenBlockFile(const FlatFilePos &pos, bool fReadOnly = false); | ||||
/** | /** | ||||
* Translation to a filesystem path. | * Translation to a filesystem path. | ||||
*/ | */ | ||||
fs::path GetBlockPosFilename(const CDiskBlockPos &pos); | fs::path GetBlockPosFilename(const FlatFilePos &pos); | ||||
/** | /** | ||||
* Import blocks from an external file. | * Import blocks from an external file. | ||||
*/ | */ | ||||
bool LoadExternalBlockFile(const Config &config, FILE *fileIn, | bool LoadExternalBlockFile(const Config &config, FILE *fileIn, | ||||
CDiskBlockPos *dbp = nullptr); | FlatFilePos *dbp = nullptr); | ||||
/** | /** | ||||
* Ensures we have a genesis block in the block tree, possibly writing one to | * Ensures we have a genesis block in the block tree, possibly writing one to | ||||
* disk. | * disk. | ||||
*/ | */ | ||||
bool LoadGenesisBlock(const CChainParams &chainparams); | bool LoadGenesisBlock(const CChainParams &chainparams); | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | void swap(CScriptCheck &check) { | ||||
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; } | ||||
}; | }; | ||||
/** Functions for disk access for blocks */ | /** Functions for disk access for blocks */ | ||||
bool ReadBlockFromDisk(CBlock &block, const CDiskBlockPos &pos, | bool ReadBlockFromDisk(CBlock &block, const FlatFilePos &pos, | ||||
const Config &config); | const Config &config); | ||||
bool ReadBlockFromDisk(CBlock &block, const CBlockIndex *pindex, | bool ReadBlockFromDisk(CBlock &block, const CBlockIndex *pindex, | ||||
const Config &config); | const Config &config); | ||||
/** Functions for validating blocks and updating the block tree */ | /** Functions for validating blocks and updating the block tree */ | ||||
/** | /** | ||||
* Context-independent validity checks. | * Context-independent validity checks. | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |