接专栏上文
4)而后执行挖矿启动命令 miner.start()
此时报错:Error: etherbase missing: etherbase must be explicitly specified at web3.js:6367:9(39) at send (web3.js:5101:62(29)) at <eval>:1:12(2)
查阅的资料显示,这是因为没有设置coinbase账户;由此可知,虽然我们刚刚的操作已然生成了”123“作为首个地址,但并没有设置coinbase,故我们先使用eth.accounts命令获取地址"0x..."(你自己的地址) 而后复制这个地址,使用miner.setEtherbase("0x...") 命令,运行结果显示true,则完成配置。
此时运行miner.start() 显示null ,并且竟然自动退出控制台,
此时回到最初始状态,试图执行
geth --identity "myetherum" --http --http.corsdomain "*" --datadir "chain" --port "30303" --http.api "db,eth,net,web3,personal,miner" --networkid 10 --rpc.enabledeprecatedpersonal --dev --dev.period 1 console 2>1.txt
报错:Fatal: Failed to unlock developer account: could not decrypt key with given password??
此时执行网上查阅到的方法均行不通,待作者探索。
共有问题如下:
1.运行miner.start() 显示null ,并且竟然自动退出控制台,且不能输入字符;
2.Failed to unlock developer account: could not decrypt key with given password