Browse Source

No need for DontHave anymore.

cl-refactor
Gav Wood 10 years ago
parent
commit
79afb509be
  1. 5
      libethcore/Common.h
  2. 2
      libethereum/BlockChain.cpp

5
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
};
};

2
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 (...)
{

Loading…
Cancel
Save