新geth版本中已经弃用personal对象
在进入geth控制台后,输入创建账户的命令:personal.newAccounts()会报错,报错如下:
The personal RPC namespace is now deprecated.In order to interact with personal APIs,you need to specifically allow it via eth --rpc.enabledeprecatedpersonal command-line flag.
大体意思就是personal这个namespace已经不用了,如果再想用的话,需要通过--rpc.enabledeprecatedpersonal这个flag。
如下:geth --datadir node1 --networkid 1008 --rpc.enabledeprecatedpersonal --nodiscover console 2>1.log
在最新版本的Geth中,personal对象已被弃用。用户如果仍需使用个人API接口,必须通过命令行参数--rpc.enabledeprecatedpersonal来启用。例如,启动Geth时应使用如geth--datadirnode1--networkid1008--rpc.enabledeprecatedpersonal--nodiscoverconsole2>1.log这样的命令。这表明个人账户管理的接口已发生变更,开发者需要注意更新他们的脚本和交互方式。
73





