【区块链】问题集锦(持续更新)
程序员文章站
2022-05-13 19:55:41
...
1.以太坊geth新版本error:account unlock with HTTP access is forbidden at web3.js
> personal.unlockAccount(eth.accounts[0])
Unlock account 0x60d526b5b029e5e9ebd7180ab83d429b4d650b5e
!! Unsupported terminal, password will be echoed.
Passphrase:
GoError: Error: account unlock with HTTP access is forbidden at web3.js:6347:37(47)
at native
at <eval>:1:24(6)
异常原因:新版本geth,出于安全考虑,默认禁止了HTTP通道解锁账户
解决方式:启动节点命令添加
--allow-insecure-unlock
启动命令如下
geth -rpc --networkid 15 -rpcport 8545 --rpcapi="db,eth,net,web3,personal"
--datadir node1 console 2>>geth.log --allow-insecure-unlock