aboutsummaryrefslogtreecommitdiffstats
path: root/core/gen_genesis.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/gen_genesis.go')
-rw-r--r--core/gen_genesis.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/gen_genesis.go b/core/gen_genesis.go
index 4d75704a6..bb8ea1d6a 100644
--- a/core/gen_genesis.go
+++ b/core/gen_genesis.go
@@ -13,6 +13,8 @@ import (
"github.com/ethereum/go-ethereum/params"
)
+var _ = (*genesisSpecMarshaling)(nil)
+
func (g Genesis) MarshalJSON() ([]byte, error) {
type Genesis struct {
Config *params.ChainConfig `json:"config"`
@@ -54,7 +56,7 @@ func (g *Genesis) UnmarshalJSON(input []byte) error {
Config *params.ChainConfig `json:"config"`
Nonce *math.HexOrDecimal64 `json:"nonce"`
Timestamp *math.HexOrDecimal64 `json:"timestamp"`
- ExtraData hexutil.Bytes `json:"extraData"`
+ ExtraData *hexutil.Bytes `json:"extraData"`
GasLimit *math.HexOrDecimal64 `json:"gasLimit" gencodec:"required"`
Difficulty *math.HexOrDecimal256 `json:"difficulty" gencodec:"required"`
Mixhash *common.Hash `json:"mixHash"`
@@ -78,7 +80,7 @@ func (g *Genesis) UnmarshalJSON(input []byte) error {
g.Timestamp = uint64(*dec.Timestamp)
}
if dec.ExtraData != nil {
- g.ExtraData = dec.ExtraData
+ g.ExtraData = *dec.ExtraData
}
if dec.GasLimit == nil {
return errors.New("missing required field 'gasLimit' for Genesis")