diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2017-04-06 16:38:21 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-04-06 16:38:21 +0800 |
commit | 3d8de95f999de6f52f0c1605eb2913278f1d87d2 (patch) | |
tree | 1906f5ec11dbbd304bb30f3e75c117727a4d1e79 /core/genesis.go | |
parent | 24b9860c1bc214d2db943bc69117818311406bdb (diff) | |
download | go-tangerine-3d8de95f999de6f52f0c1605eb2913278f1d87d2.tar go-tangerine-3d8de95f999de6f52f0c1605eb2913278f1d87d2.tar.gz go-tangerine-3d8de95f999de6f52f0c1605eb2913278f1d87d2.tar.bz2 go-tangerine-3d8de95f999de6f52f0c1605eb2913278f1d87d2.tar.lz go-tangerine-3d8de95f999de6f52f0c1605eb2913278f1d87d2.tar.xz go-tangerine-3d8de95f999de6f52f0c1605eb2913278f1d87d2.tar.zst go-tangerine-3d8de95f999de6f52f0c1605eb2913278f1d87d2.zip |
core, core/types: regenerate JSON marshaling, add "hash" to headers (#13868)
* Makefile: fix devtools target
* core: regenerate genesis marshaling with fjl/gencodec@cbfa5be5a8a8
* core/types: regenerate marshaling methods with fjl/gencodec@cbfa5be5a8a8
* core/types: add "hash" to JSON headers
Diffstat (limited to 'core/genesis.go')
-rw-r--r-- | core/genesis.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/core/genesis.go b/core/genesis.go index 34725241e..883cea2fd 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -41,16 +41,16 @@ var errGenesisNoConfig = errors.New("genesis has no chain configuration") // Genesis specifies the header fields, state of a genesis block. It also defines hard // fork switch-over blocks through the chain configuration. type Genesis struct { - Config *params.ChainConfig `json:"config" optional:"true"` - Nonce uint64 `json:"nonce" optional:"true"` - Timestamp uint64 `json:"timestamp" optional:"true"` - ParentHash common.Hash `json:"parentHash" optional:"true"` - ExtraData []byte `json:"extraData" optional:"true"` - GasLimit uint64 `json:"gasLimit"` - Difficulty *big.Int `json:"difficulty"` - Mixhash common.Hash `json:"mixHash" optional:"true"` - Coinbase common.Address `json:"coinbase" optional:"true"` - Alloc GenesisAlloc `json:"alloc"` + Config *params.ChainConfig `json:"config"` + Nonce uint64 `json:"nonce"` + Timestamp uint64 `json:"timestamp"` + ParentHash common.Hash `json:"parentHash"` + ExtraData []byte `json:"extraData"` + GasLimit uint64 `json:"gasLimit" gencodec:"required"` + Difficulty *big.Int `json:"difficulty" gencodec:"required"` + Mixhash common.Hash `json:"mixHash"` + Coinbase common.Address `json:"coinbase"` + Alloc GenesisAlloc `json:"alloc" gencodec:"required"` } // GenesisAlloc specifies the initial state that is part of the genesis block. @@ -58,10 +58,10 @@ type GenesisAlloc map[common.Address]GenesisAccount // GenesisAccount is an account in the state of the genesis block. type GenesisAccount struct { - Code []byte `json:"code,omitempty" optional:"true"` - Storage map[common.Hash]common.Hash `json:"storage,omitempty" optional:"true"` - Balance *big.Int `json:"balance"` - Nonce uint64 `json:"nonce,omitempty" optional:"true"` + Code []byte `json:"code,omitempty"` + Storage map[common.Hash]common.Hash `json:"storage,omitempty"` + Balance *big.Int `json:"balance" gencodec:"required"` + Nonce uint64 `json:"nonce,omitempty"` } // field type overrides for gencodec |