From 79afb509be8b97f29cec148933520e5980c4dc99 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 30 Jul 2015 14:32:52 +0200 Subject: [PATCH] No need for DontHave anymore. --- libethcore/Common.h | 5 ++--- libethereum/BlockChain.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libethcore/Common.h b/libethcore/Common.h index 13b800897..072d78cc3 100644 --- a/libethcore/Common.h +++ b/libethcore/Common.h @@ -127,7 +127,6 @@ struct ImportRequirements enum { ValidSeal = 1, ///< Validate seal - DontHave = 2, ///< Avoid old blocks UncleBasic = 4, ///< Check the basic structure of the uncles. TransactionBasic = 8, ///< Check the basic structure of the transactions. UncleSeals = 16, ///< Check the basic structure of the uncles. @@ -136,9 +135,9 @@ struct ImportRequirements UncleParent = 128, ///< Check uncle parent block header. CheckUncles = UncleBasic | UncleSeals, ///< Check uncle seals. CheckTransactions = TransactionBasic | TransactionSignatures, ///< Check transaction signatures. - OutOfOrderChecks = ValidSeal | DontHave | CheckUncles | CheckTransactions, ///< Do all checks that can be done independently of prior blocks having been imported. + OutOfOrderChecks = ValidSeal | CheckUncles | CheckTransactions, ///< Do all checks that can be done independently of prior blocks having been imported. InOrderChecks = Parent | UncleParent, ///< Do all checks that cannot be done independently of prior blocks having been imported. - Everything = ValidSeal | DontHave | CheckUncles | CheckTransactions | Parent | UncleParent, + Everything = ValidSeal | CheckUncles | CheckTransactions | Parent | UncleParent, None = 0 }; }; diff --git a/libethereum/BlockChain.cpp b/libethereum/BlockChain.cpp index 8602afec0..8db2e9356 100644 --- a/libethereum/BlockChain.cpp +++ b/libethereum/BlockChain.cpp @@ -761,7 +761,7 @@ ImportRoute BlockChain::import(VerifiedBlockRef const& _block, OverlayDB const& try { State canary(_db, BaseState::Empty); - canary.populateFromChain(*this, _block.info.hash(), ImportRequirements::DontHave); + canary.populateFromChain(*this, _block.info.hash()); } catch (...) {