diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-06 22:12:40 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:52 +0800 |
commit | 1756fa0135920beb749c313bdd966497bc1bff28 (patch) | |
tree | 32dd160181a3ce6348f4319cf249f4c6eed96ac7 /core/gen_genesis_account.go | |
parent | e79feadf101f8cf05ce32ca5be0a9e44a75da1a9 (diff) | |
download | dexon-1756fa0135920beb749c313bdd966497bc1bff28.tar.gz dexon-1756fa0135920beb749c313bdd966497bc1bff28.tar.zst dexon-1756fa0135920beb749c313bdd966497bc1bff28.zip |
core: vm: governance: add node info
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 } |