Skip to content

Instantly share code, notes, and snippets.

@mikers1
Created August 1, 2017 16:55
Show Gist options
  • Save mikers1/d13300efdf96c279845e64758f95e516 to your computer and use it in GitHub Desktop.
Save mikers1/d13300efdf96c279845e64758f95e516 to your computer and use it in GitHub Desktop.
void BlockChain::insert(bytes const& _block, bytesConstRef _receipts, bool _mustBeNew)
{
// VERIFY: populates from the block and checks the block is internally coherent.
VerifiedBlockRef block;
#if ETH_CATCH
try
#endif
{
block = verifyBlock(&_block, m_onBad, ImportRequirements::OutOfOrderChecks);
}
#if ETH_CATCH
catch (Exception& ex)
{
// clog(BlockChainNote) << " Malformed block: " << diagnostic_information(ex);
ex << errinfo_phase(2);
ex << errinfo_now(time(0));
throw;
}
#endif
insert(block, _receipts, _mustBeNew);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment