truechain / truechain-engineering-code

Go implementation of TrueChain
GNU Lesser General Public License v3.0
100 stars 81 forks source link

Update README.md #82

Closed dudebing99 closed 5 years ago

dudebing99 commented 5 years ago

In the section Defining the private genesis state, the genesis.json is not correct. We need to change it from XXX to "XXX" like this:

  "alloc":{
    "0x7c357530174275dd30e46319b89f71186256e4f7" : { "balance" : "90000000000000000000000"},
    "0x4cf807958b9f6d9fd9331397d7a89a079ef43288" : { "balance" : "90000000000000000000000"}
  },

Otherwise, we will encounter error like this:

root@7bfb2b17e40a:/opt/truechain# ./getrue init ./genesis.json
INFO [05-08|07:02:44.490] Enabling metrics collection
Fatal: invalid genesis file: json: cannot unmarshal number into Go struct field Genesis.alloc of type *math.HexOrDecimal256
hyangl commented 5 years ago

thanks for your pull request.