From 6e90aa80ebe871a6067b40870ae6f76cfe6592e4 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Wed, 29 Jul 2015 09:22:08 +0200 Subject: [PATCH] check uncles (including difficulty and gasLimit) --- libethereum/BlockChain.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libethereum/BlockChain.h b/libethereum/BlockChain.h index c60482817..c08faaa22 100644 --- a/libethereum/BlockChain.h +++ b/libethereum/BlockChain.h @@ -450,6 +450,10 @@ public: try { h.populateFromHeader(RLP(uncle.data()), (_ir & ImportRequirements::UncleSeals) ? Strictness::CheckEverything : Strictness::IgnoreSeal); + bytes parentHeader(headerData(h.parentHash())); + if (parentHeader.empty()) + BOOST_THROW_EXCEPTION(InvalidParentHash()); + h.verifyParent(typename Sealer::BlockHeader(parentHeader, IgnoreSeal, h.parentHash(), HeaderData)); } catch (Exception& ex) {