aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2020-09-16 20:03:32 -0400
committerDeterminant <[email protected]>2020-09-16 20:03:32 -0400
commit5370b602abea0415f7609f19e3f44d5c9366e5bd (patch)
tree9b69b5c01cac695863bc604fbbdea8179ff34abe /core
parentb1ac5e6ce73c37378e575d6291e3c5f1ee170430 (diff)
...
Diffstat (limited to 'core')
-rw-r--r--core/types/gen_header_json.go6
1 files changed, 6 insertions, 0 deletions
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
}