aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2017-10-26 14:54:33 -0400
committerMarcoFalke <falke.marco@gmail.com>2017-11-02 13:19:57 -0400
commit59b210d9a7fec79afba07d2ea90b190ce1d74209 (patch)
tree95faab56ca70a01a261875fb84bb3aa8e179a291 /src/validation.h
parentfc966bbd2b6596f8ac68ef3c345d47fbb5d7e0c9 (diff)
downloadbitcoin-59b210d9a7fec79afba07d2ea90b190ce1d74209.tar.xz
Disconnect outbound peers relaying invalid headers
Github-Pull: #11568 Rebased-From: 37886d5e2f9992678dea4b1bd893f4f10d61d3ad
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/validation.h b/src/validation.h
index f3d88d3180..4acdac81c9 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -248,8 +248,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);