diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2017-10-26 14:54:33 -0400 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@gmail.com> | 2017-10-27 16:29:12 -0400 |
commit | 37886d5e2f9992678dea4b1bd893f4f10d61d3ad (patch) | |
tree | 25a7e92c05cad5014c522310e76efd4fbf88bb84 /src/validation.h | |
parent | 4637f18522429473e68f6f512a03040e121a446d (diff) |
Disconnect outbound peers relaying invalid headers
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/validation.h b/src/validation.h index 6bc52753c5..93669de6c4 100644 --- a/src/validation.h +++ b/src/validation.h @@ -247,8 +247,9 @@ bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<cons * @param[out] state This may be set to an Error state if any error occurred processing them * @param[in] chainparams The params for the chain we want to connect to * @param[out] ppindex If set, the pointer will be set to point to the last new block index object for the given headers + * @param[out] first_invalid First header that fails validation, if one exists */ -bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& block, CValidationState& state, const CChainParams& chainparams, const CBlockIndex** ppindex=nullptr); +bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& block, CValidationState& state, const CChainParams& chainparams, const CBlockIndex** ppindex=nullptr, CBlockHeader *first_invalid=nullptr); /** Check whether enough disk space is available for an incoming block */ bool CheckDiskSpace(uint64_t nAdditionalBytes = 0); |