diff --git a/core/types/block.go b/core/types/block.go index 6defe1e066..4408ec4960 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -18,6 +18,7 @@ package types import ( + "crypto/sha256" "encoding/binary" "fmt" "io" @@ -475,10 +476,11 @@ func CalcUncleHash(uncles []*Header) common.Hash { } func CalcRequestsHash(requests [][]byte) common.Hash { - if len(requests) == 0 { - return EmptyRequestsHash + h := sha256.New() + for _, item := range requests { + h.Write(item) } - return rlpHash(requests) + return common.Hash(h.Sum(nil)) } // NewBlockWithHeader creates a block with the given header data. The