【发布时间】:2017-02-27 00:07:29
【问题描述】:
我正在尝试创建一个专用网络,以便开始测试我的 Solidity 代码。但是,当使用 geth --rpc 启动 geth 专用网络时,我遇到了无效响应的错误。 {"jsonrpc":"2.0","error":{"code":-32600,"message":"EOF"}} 检查 localhost:8545 时。
我觉得没关系,但是我的 genesis.json 文件是
{
"nonce": "0x0000000000000042", "timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x0", "gasLimit": "0x8000000", "difficulty": "0x400",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333", "alloc": { }}
我也尝试使用 testrpc 仅使用命令 testrpc 创建测试网络,但这里 localhost:8545 返回解析错误 {"jsonrpc": "2.0", "id": null, "error": {"message": "Parse error", "code": -32700}}。
我发送的 JSON 是什么,因为它似乎写错了?
谢谢
【问题讨论】:
标签: json json-rpc ethereum private-network