From b455f557302ef694ef07020ec2dd9da11ca0f8b7 Mon Sep 17 00:00:00 2001 From: kimmylin <30611210+kimmylin@users.noreply.github.com> Date: Mon, 26 Mar 2018 15:07:21 +0800 Subject: [PATCH] core: Modify Hash function for Istanbul header --- core/types/block.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/types/block.go b/core/types/block.go index 92b868d9da..ab1716fdf0 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -100,6 +100,14 @@ type headerMarshaling struct { // Hash returns the block hash of the header, which is simply the keccak256 hash of its // RLP encoding. func (h *Header) Hash() common.Hash { + // If the mix digest is equivalent to the predefined Istanbul digest, use Istanbul + // specific hash calculation. + //if h.MixDigest == IstanbulDigest { + // // Seal is reserved in extra-data. To prove block is signed by the proposer. + // if istanbulHeader := IstanbulFilteredHeader(h, true); istanbulHeader != nil { + // return rlpHash(istanbulHeader) + // } + //} return rlpHash(h) }