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 "blockfileinfo.h" | #include "blockfileinfo.h" | ||||
#include "chain.h" | |||||
deadalnix: Why is that required ? Can't this be replaced favorably by a forward declaration ? | |||||
#include "coins.h" | #include "coins.h" | ||||
#include "consensus/consensus.h" | #include "consensus/consensus.h" | ||||
#include "diskblockpos.h" | #include "diskblockpos.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 "sync.h" | #include "sync.h" | ||||
#include "versionbits.h" | #include "versionbits.h" | ||||
▲ Show 20 Lines • Show All 662 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Return the spend height, which is one more than the inputs.GetBestBlock(). | * Return the spend height, which is one more than the inputs.GetBestBlock(). | ||||
* While checking, GetBestBlock() refers to the parent block. (protected by | * While checking, GetBestBlock() refers to the parent block. (protected by | ||||
* cs_main) | * cs_main) | ||||
* This is also true for mempool checks. | * This is also true for mempool checks. | ||||
*/ | */ | ||||
int GetSpendHeight(const CCoinsViewCache &inputs); | int GetSpendHeight(const CCoinsViewCache &inputs); | ||||
extern VersionBitsCache versionbitscache; | |||||
/** | /** | ||||
* Determine what nVersion a new block should use. | * Determine what nVersion a new block should use. | ||||
*/ | */ | ||||
int32_t ComputeBlockVersion(const CBlockIndex *pindexPrev, | int32_t ComputeBlockVersion(const CBlockIndex *pindexPrev, | ||||
const Consensus::Params ¶ms); | const Consensus::Params ¶ms); | ||||
/** | /** | ||||
* Reject codes greater or equal to this can be returned by AcceptToMemPool or | * Reject codes greater or equal to this can be returned by AcceptToMemPool or | ||||
Show All 23 Lines |
Why is that required ? Can't this be replaced favorably by a forward declaration ?