View in context in the libbitcoin Slack #general mirror.
When received, all checks which don't require strict ordering are performed and transactions are stored in a global transaction index.
// Header state is checked by organize.
code protocol_block_in_31800::check(const chain::block& block,
const chain::context& ctx, bool bypass) const NOEXCEPT
{
code ec{};
if (bypass)
{
// Only identity is required under bypass.
if (((ec = block.identify())) || ((ec = block.identify(ctx))))
return ec;
}
else
{
// Identity is not correct if error::invalid_transaction_commitment.
if ((ec = block.check()))
{
if ((ec != system::error::invalid_transaction_commitment) &&
block.is_malleated())
return system::error::block_malleated;
return ec;
}
if ((ec = block.check(ctx)))
return ec;
}
return system::error::block_success;
} (edited)