aboutsummaryrefslogtreecommitdiffstats
path: root/core/gen_genesis_account.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2018-01-08 21:13:22 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-08 21:13:22 +0800
commit9d06026c1991fdd8f034ce194fa20a0740c21810 (patch)
tree8625b7c087dfcd8cf8f087113c7242cf0d7639cd /core/gen_genesis_account.go
parent5c2f1e00148f16655d3fb63b93920b1108165c56 (diff)
downloaddexon-9d06026c1991fdd8f034ce194fa20a0740c21810.tar
dexon-9d06026c1991fdd8f034ce194fa20a0740c21810.tar.gz
dexon-9d06026c1991fdd8f034ce194fa20a0740c21810.tar.bz2
dexon-9d06026c1991fdd8f034ce194fa20a0740c21810.tar.lz
dexon-9d06026c1991fdd8f034ce194fa20a0740c21810.tar.xz
dexon-9d06026c1991fdd8f034ce194fa20a0740c21810.tar.zst
dexon-9d06026c1991fdd8f034ce194fa20a0740c21810.zip
all: regenerate codecs with gencodec commit 90983d99de (#15830)
Fixes #15777 because null is now allowed for hexutil.Bytes.
Diffstat (limited to 'core/gen_genesis_account.go')
-rw-r--r--core/gen_genesis_account.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/gen_genesis_account.go b/core/gen_genesis_account.go
index 15c9565a2..64fb9b924 100644
--- a/core/gen_genesis_account.go
+++ b/core/gen_genesis_account.go
@@ -38,18 +38,18 @@ func (g GenesisAccount) MarshalJSON() ([]byte, error) {
func (g *GenesisAccount) UnmarshalJSON(input []byte) error {
type GenesisAccount struct {
- Code hexutil.Bytes `json:"code,omitempty"`
+ Code *hexutil.Bytes `json:"code,omitempty"`
Storage map[storageJSON]storageJSON `json:"storage,omitempty"`
Balance *math.HexOrDecimal256 `json:"balance" gencodec:"required"`
Nonce *math.HexOrDecimal64 `json:"nonce,omitempty"`
- PrivateKey hexutil.Bytes `json:"secretKey,omitempty"`
+ PrivateKey *hexutil.Bytes `json:"secretKey,omitempty"`
}
var dec GenesisAccount
if err := json.Unmarshal(input, &dec); err != nil {
return err
}
if dec.Code != nil {
- g.Code = dec.Code
+ g.Code = *dec.Code
}
if dec.Storage != nil {
g.Storage = make(map[common.Hash]common.Hash, len(dec.Storage))
@@ -65,7 +65,7 @@ func (g *GenesisAccount) UnmarshalJSON(input []byte) error {
g.Nonce = uint64(*dec.Nonce)
}
if dec.PrivateKey != nil {
- g.PrivateKey = dec.PrivateKey
+ g.PrivateKey = *dec.PrivateKey
}
return nil
}