【发布时间】:2021-04-09 16:14:27
【问题描述】:
当我运行 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
【问题讨论】:
标签: ethereum go-ethereum geth