【區塊鏈】問題集錦(持續更新)

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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章