当我运行geth命令列出所有帐户时,它工作正常:
geth account list
INFO [04-09|15:47:35.967] Maximum peer count ETH=50 LES=0 total=50
INFO [04-09|15:47:35.967] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [04-09|15:47:35.968] Set global gas cap cap=25000000
Account #0: {<my_public_address>} keystore: <path_to_keystore>但是当我启动它的控制台时,当我请求余额/账户时,我得到了一个未定义的空数组:
> eth.getAccounts()
undefined
> eth.accounts
[]但是,如果我指定我的地址来检查余额,它可以很好地工作:
> eth.getBalance("<my account address>")
3000000000000000000我在rinkeby网络上运行本地自托管的以太节点:geth --rinkeby --rpc --rpcapi "eth,net,web3" --cache 2048
发布于 2021-11-09 19:14:07
尝试手动使用--keystore选项,并将路径添加到包含密钥库的文件夹。(在本例中,它可能是~/.ethereum/rinkeby/keystore )
https://stackoverflow.com/questions/67024660
复制相似问题