From e0ac2918cc14aa5c401e4d70a7069e9fe0a47f71 Mon Sep 17 00:00:00 2001 From: Raul Jordan Date: Wed, 16 May 2018 12:59:00 -0400 Subject: [PATCH] sharding: hashes collationHeaderData instead of the full header Former-commit-id: 0cb0dcbd3241a34c34fd79cef2f8fec8e4ba0d5f [formerly 5e2f12a776dd956b1f98dc5a85b93a06ef22b581] Former-commit-id: 7619acc6315efc4d71d0687b048d223a8cf4e3f7 --- sharding/collation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sharding/collation.go b/sharding/collation.go index 245b1e8e0..5528453e4 100644 --- a/sharding/collation.go +++ b/sharding/collation.go @@ -56,10 +56,10 @@ func NewCollationHeader(shardID *big.Int, chunkRoot *common.Hash, period *big.In return &CollationHeader{data} } -// Hash takes the keccak256 of the collation header's contents. +// Hash takes the keccak256 of the collation header's data contents. func (h *CollationHeader) Hash() (hash common.Hash) { hw := sha3.NewKeccak256() - rlp.Encode(hw, h) + rlp.Encode(hw, h.data) hw.Sum(hash[:0]) return hash }