我正在尝试创建一个专用网络,以便我可以开始测试我的 Solidity 代码。但是,当启动 geth 专用网络时,geth --rpc
我遇到了无效响应的错误。{"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 是什么,因为它似乎写错了?
谢谢