core: Modify Hash function for Istanbul header

This commit is contained in:
kimmylin 2018-03-26 15:07:21 +08:00
parent b7b465c549
commit b455f55730

View file

@ -100,6 +100,14 @@ type headerMarshaling struct {
// Hash returns the block hash of the header, which is simply the keccak256 hash of its // Hash returns the block hash of the header, which is simply the keccak256 hash of its
// RLP encoding. // RLP encoding.
func (h *Header) Hash() common.Hash { 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) return rlpHash(h)
} }