Example #1
0
LastHashes State::getLastHashes(BlockChain const& _bc, unsigned _n) const
{
	LastHashes ret;
	ret.resize(256);
	if (c_protocolVersion > 49)
	{
		ret[0] = _bc.numberHash(_n);
		for (unsigned i = 1; i < 256; ++i)
			ret[i] = ret[i - 1] ? _bc.details(ret[i - 1]).parent : h256();
	}
	return ret;
}
Example #2
0
Executive::Executive(State& _s, BlockChain const& _bc, unsigned _number, unsigned _level):
	m_s(_s),
	m_envInfo(_bc.info(_bc.numberHash(_number)), _bc.lastHashes(_number - 1)),
	m_depth(_level)
{}