The method personal_newAccount does not exist/is not available

电玩女神 2021-11-13 23:06 699阅读 0赞

The method personal_newAccount does not exist/is not available

进行ETC RCP API调用的时候出现以下问题:

  1. {
  2. "jsonrpc": "2.0",
  3. "id": 1,
  4. "error": {
  5. "code": -32601,
  6. "message": "The method personal_newAccount does not exist/is not available"
  7. }
  8. }

原因以及解决办法请参考如下链接:

https://github.com/ethereum/go-ethereum/issues/2723

https://github.com/ethereum/web3.js/issues/494

我的做法就是参考第二个链接,以下面的指令启动geth:

  1. geth --rpcapi="db,eth,net,web3,personal,web3"

启动之后,连接上geth并打开RPC访问:
在这里插入图片描述

之后直接postman调用或者代码里通过web3j调用都是OK的:
在这里插入图片描述

这一点想必ETH和ETC是一样的。

发表评论

表情:
评论列表 (有 0 条评论,699人围观)

还没有评论,来说两句吧...

相关阅读