Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geth默认禁止HTTP通道解锁账户 #17

Open
liuqinglqlq opened this issue Jun 8, 2022 · 0 comments
Open

geth默认禁止HTTP通道解锁账户 #17

liuqinglqlq opened this issue Jun 8, 2022 · 0 comments

Comments

@liuqinglqlq
Copy link

liuqinglqlq commented Jun 8, 2022

新版本geth,出于安全考虑,默认禁止了HTTP通道解锁账户
相关issue:ethereum/go-ethereum#17037

第5章中的“转账与收款”
需要以下面的命令来启动节点,才能使用personal.unlockAccount()

geth --datadir ./db/ --http --http.addr=127.0.0.1 --http.port 8545 --http.corsdomain "*"
--http.api "eth,net,web3,personal,admin,shh,txpool,debug,miner"
--nodiscover --maxpeers 30 --networkid 198989 --port 30303
--mine --miner.threads 1
--miner.etherbase "0xb35316db015e203b0fffe4f8fa99201f26bb0edc"
--allow-insecure-unlock

如果没有加参数 --allow-insecure-unlock,则会报错
GoError: Error: account unlock with HTTP access is forbidden at web3.js:6365:9(45)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant