0

我正在尝试建立起源,但这样做时遇到了很多错误。在同一目录的终端上输入 gethinit genesis.json后,我得到了这个:

Caros-MacBook-Pro:testcmy caro$ geth init genesis.json
I0223 18:52:32.817358 ethdb/database.go:83] Allotted 128MB cache and 1024 file handles to /Users/caro/Library/Ethereum/geth/chaindata
I0223 18:52:32.976868 ethdb/database.go:176] closed db:/Users/caro/Library/Ethereum/geth/chaindata
I0223 18:52:32.976933 ethdb/database.go:83] Allotted 128MB cache and 1024 file handles to /Users/caro/Library/Ethereum/geth/chaindata
Fatal: failed to write genesis block: invalid character '\\' looking for beginning of object key string

我参考了这个网站:http ://hypernephelist.com/2016/05/30/deploying-a-private-Ethereum-blockchain.html 并按照步骤操作。

.json 如下:

{
    "nonce": "0x0000000000000042",

"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "difficulty": "0x4000",

 "alloc": {},

"coinbase": "0x0000000000000000000000000000000000000000",

"timestamp": "0x00",

 "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",

 "extraData": "Custom Ethereum Genesis Block",

 "gasLimit": "0xffffffff"
}

那么,神秘的无效\在哪里?json中没有\!它出什么问题了?

4

1 回答 1

0

可能您正在使用添加一些额外字符的文本编辑器。尝试使用 nano 或类似的东西

于 2017-08-19T10:52:01.763 回答