Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Copyright (c) 2017 The Bitcoin developers | // Copyright (c) 2017 The Bitcoin 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_VALIDATION_H | #ifndef BITCOIN_VALIDATION_H | ||||
#define BITCOIN_VALIDATION_H | #define BITCOIN_VALIDATION_H | ||||
#if defined(HAVE_CONFIG_H) | #if defined(HAVE_CONFIG_H) | ||||
#include "config/bitcoin-config.h" | #include "config/bitcoin-config.h" | ||||
#endif | #endif | ||||
#include "amount.h" | #include "amount.h" | ||||
#include "chain.h" | #include "chain.h" | ||||
#include "coins.h" | #include "coins.h" | ||||
#include "protocol.h" // For CMessageHeader::MessageStartChars | #include "protocol.h" // For CMessageHeader::MessageMagic | ||||
#include "script/script_error.h" | #include "script/script_error.h" | ||||
#include "sync.h" | #include "sync.h" | ||||
#include "versionbits.h" | #include "versionbits.h" | ||||
#include <algorithm> | #include <algorithm> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <exception> | #include <exception> | ||||
#include <map> | #include <map> | ||||
▲ Show 20 Lines • Show All 517 Lines • ▼ Show 20 Lines | void swap(CScriptCheck &check) { | ||||
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 WriteBlockToDisk(const CBlock &block, CDiskBlockPos &pos, | bool WriteBlockToDisk(const CBlock &block, CDiskBlockPos &pos, | ||||
const CMessageHeader::MessageStartChars &messageStart); | const CMessageHeader::MessageMagic &messageStart); | ||||
bool ReadBlockFromDisk(CBlock &block, const CDiskBlockPos &pos, | bool ReadBlockFromDisk(CBlock &block, const CDiskBlockPos &pos, | ||||
const Consensus::Params &consensusParams); | const Consensus::Params &consensusParams); | ||||
bool ReadBlockFromDisk(CBlock &block, const CBlockIndex *pindex, | bool ReadBlockFromDisk(CBlock &block, const CBlockIndex *pindex, | ||||
const Consensus::Params &consensusParams); | const Consensus::Params &consensusParams); | ||||
/** 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 128 Lines • Show Last 20 Lines |