diff options
Diffstat (limited to 'core/gen_genesis_account.go')
-rw-r--r-- | core/gen_genesis_account.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/gen_genesis_account.go b/core/gen_genesis_account.go index 1a5653e4b..15393d978 100644 --- a/core/gen_genesis_account.go +++ b/core/gen_genesis_account.go @@ -23,6 +23,7 @@ func (g GenesisAccount) MarshalJSON() ([]byte, error) { Nonce math.HexOrDecimal64 `json:"nonce,omitempty"` Staked *math.HexOrDecimal256 `json:"staked"` PublicKey hexutil.Bytes `json:"publicKey"` + NodeInfo NodeInfo `json:"info"` PrivateKey hexutil.Bytes `json:"secretKey,omitempty"` } var enc GenesisAccount @@ -37,6 +38,7 @@ func (g GenesisAccount) MarshalJSON() ([]byte, error) { enc.Nonce = math.HexOrDecimal64(g.Nonce) enc.Staked = (*math.HexOrDecimal256)(g.Staked) enc.PublicKey = g.PublicKey + enc.NodeInfo = g.NodeInfo enc.PrivateKey = g.PrivateKey return json.Marshal(&enc) } @@ -50,6 +52,7 @@ func (g *GenesisAccount) UnmarshalJSON(input []byte) error { Nonce *math.HexOrDecimal64 `json:"nonce,omitempty"` Staked *math.HexOrDecimal256 `json:"staked"` PublicKey *hexutil.Bytes `json:"publicKey"` + NodeInfo *NodeInfo `json:"info"` PrivateKey *hexutil.Bytes `json:"secretKey,omitempty"` } var dec GenesisAccount @@ -78,6 +81,9 @@ func (g *GenesisAccount) UnmarshalJSON(input []byte) error { if dec.PublicKey != nil { g.PublicKey = *dec.PublicKey } + if dec.NodeInfo != nil { + g.NodeInfo = *dec.NodeInfo + } if dec.PrivateKey != nil { g.PrivateKey = *dec.PrivateKey } |