diff options
author | Jorge Timón <jtimon@jtimon.cc> | 2016-05-20 14:43:37 +0200 |
---|---|---|
committer | Jorge Timón <jtimon@jtimon.cc> | 2016-05-20 14:53:03 +0200 |
commit | ee9f4a5b1505113eae0fe8d70fd0414bd5bce0ff (patch) | |
tree | 3be872fd5be5a9e3186118370f3f4711761c8c29 /src/main.h | |
parent | 1b87e5b5b184a0a6c683eda23b36393822b57f03 (diff) |
Consensus: Decouple from chainparams.o and timedata.o
Do it for the consensus-critical functions:
- CheckBlockHeader
- CheckBlock
- ContextualCheckBlockHeader
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.h b/src/main.h index f287171f14..4e93c084f4 100644 --- a/src/main.h +++ b/src/main.h @@ -425,13 +425,13 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex, const Consensus /** Functions for validating blocks and updating the block tree */ /** Context-independent validity checks */ -bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW = true); -bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW = true, bool fCheckMerkleRoot = true); +bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, const Consensus::Params& consensusParams, int64_t nAdjustedTime, bool fCheckPOW = true); +bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::Params& consensusParams, int64_t nAdjustedTime, bool fCheckPOW = true, bool fCheckMerkleRoot = true); /** Context-dependent validity checks. * By "context", we mean only the previous block headers, but not the UTXO * set; UTXO-related validity checks are done in ConnectBlock(). */ -bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& state, CBlockIndex *pindexPrev); +bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& state, const Consensus::Params& consensusParams, CBlockIndex* pindexPrev); bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIndex *pindexPrev); /** Apply the effects of this block (with given index) on the UTXO set represented by coins. |