Explorar o código

core, eth: added json tag field for proper unmarshalling

According to our own instructions the genesis config attribute should be
"config". The genesis definition in the go code, however, has a field
called `ChainConfig`. This field now has a `json:"config"` struct tag so
that the json is properly unmarshalled.

This fixes #2482
Jeffrey Wilcke %!s(int64=9) %!d(string=hai) anos
pai
achega
c1a4dcfc87
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      core/genesis.go

+ 1 - 1
core/genesis.go

@@ -43,7 +43,7 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block,
 	}
 
 	var genesis struct {
-		ChainConfig *ChainConfig
+		ChainConfig *ChainConfig `json:"config"`
 		Nonce       string
 		Timestamp   string
 		ParentHash  string