【区块链】问题集锦(持续更新)

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

原创文章 88 获赞 41 访问量 16万+

猜你喜欢

转载自blog.csdn.net/Damionew/article/details/104687053