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 21:32:49 +0800
commitd7127cb517f29e727a48a588484834d7f242aadb (patch)
treee8737bce55f56d49245dba5a2a717ff2454b3bf6 /core/gen_genesis.go
parentccaefd2fa1b7a28ff2310f2ee339a460563a4ff0 (diff)
downloaddexon-d7127cb517f29e727a48a588484834d7f242aadb.tar
dexon-d7127cb517f29e727a48a588484834d7f242aadb.tar.gz
dexon-d7127cb517f29e727a48a588484834d7f242aadb.tar.bz2
dexon-d7127cb517f29e727a48a588484834d7f242aadb.tar.lz
dexon-d7127cb517f29e727a48a588484834d7f242aadb.tar.xz
dexon-d7127cb517f29e727a48a588484834d7f242aadb.tar.zst
dexon-d7127cb517f29e727a48a588484834d7f242aadb.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"`