From 5370b602abea0415f7609f19e3f44d5c9366e5bd Mon Sep 17 00:00:00 2001 From: Determinant Date: Wed, 16 Sep 2020 20:03:32 -0400 Subject: ... --- core/types/gen_header_json.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/types/gen_header_json.go') diff --git a/core/types/gen_header_json.go b/core/types/gen_header_json.go index 4212b8d..385892c 100644 --- a/core/types/gen_header_json.go +++ b/core/types/gen_header_json.go @@ -31,6 +31,7 @@ func (h Header) MarshalJSON() ([]byte, error) { Extra hexutil.Bytes `json:"extraData" gencodec:"required"` MixDigest common.Hash `json:"mixHash"` Nonce BlockNonce `json:"nonce"` + ExtDataHash common.Hash `json:"extDataHash" gencodec:"required"` Hash common.Hash `json:"hash"` } var enc Header @@ -49,6 +50,7 @@ func (h Header) MarshalJSON() ([]byte, error) { enc.Extra = h.Extra enc.MixDigest = h.MixDigest enc.Nonce = h.Nonce + enc.ExtDataHash = h.ExtDataHash enc.Hash = h.Hash() return json.Marshal(&enc) } @@ -71,6 +73,7 @@ func (h *Header) UnmarshalJSON(input []byte) error { Extra *hexutil.Bytes `json:"extraData" gencodec:"required"` MixDigest *common.Hash `json:"mixHash"` Nonce *BlockNonce `json:"nonce"` + ExtDataHash *common.Hash `json:"extDataHash" gencodec:"required"` } var dec Header if err := json.Unmarshal(input, &dec); err != nil { @@ -134,5 +137,8 @@ func (h *Header) UnmarshalJSON(input []byte) error { if dec.Nonce != nil { h.Nonce = *dec.Nonce } + if dec.ExtDataHash != nil { + h.ExtDataHash = *dec.ExtDataHash + } return nil } -- cgit v1.2.3