aboutsummaryrefslogtreecommitdiffstats
path: root/core/gen_genesis.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-11 15:01:10 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 13:49:52 +0800
commitc67324c68e74aed9f12718b899136f53459dcff8 (patch)
treebf020bc1590034e68e664982e40952320d5f2b9f /core/gen_genesis.go
parentee9678ab194a7daec5a7bc353d994d0dcbee2209 (diff)
downloaddexon-c67324c68e74aed9f12718b899136f53459dcff8.tar
dexon-c67324c68e74aed9f12718b899136f53459dcff8.tar.gz
dexon-c67324c68e74aed9f12718b899136f53459dcff8.tar.bz2
dexon-c67324c68e74aed9f12718b899136f53459dcff8.tar.lz
dexon-c67324c68e74aed9f12718b899136f53459dcff8.tar.xz
dexon-c67324c68e74aed9f12718b899136f53459dcff8.tar.zst
dexon-c67324c68e74aed9f12718b899136f53459dcff8.zip
core: add stake and public key to genesis account info
Diffstat (limited to 'core/gen_genesis.go')
-rw-r--r--core/gen_genesis.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/gen_genesis.go b/core/gen_genesis.go
index 022f8257a..63f478cc7 100644
--- a/core/gen_genesis.go
+++ b/core/gen_genesis.go
@@ -15,6 +15,7 @@ import (
var _ = (*genesisSpecMarshaling)(nil)
+// MarshalJSON marshals as JSON.
func (g Genesis) MarshalJSON() ([]byte, error) {
type Genesis struct {
Config *params.ChainConfig `json:"config"`
@@ -51,6 +52,7 @@ func (g Genesis) MarshalJSON() ([]byte, error) {
return json.Marshal(&enc)
}
+// UnmarshalJSON unmarshals from JSON.
func (g *Genesis) UnmarshalJSON(input []byte) error {
type Genesis struct {
Config *params.ChainConfig `json:"config"`