提交 3124a8b2 编写于 作者: K Kevin Heifner

Exclude producer_signature from block id

上级 bf6c468d
......@@ -21,7 +21,8 @@ namespace eosio { namespace chain {
block_id_type signed_block_header::id()const
{
block_id_type result = fc::sha256::hash(*this);
// Do not include signed_block_header attributes in id, specifically exclude producer_signature.
block_id_type result = fc::sha256::hash(*static_cast<const block_header*>(this));
result._hash[0] &= 0xffffffff00000000;
result._hash[0] += fc::endian_reverse_u32(block_num()); // store the block num in the ID, 160 bits is plenty for the hash
return result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册