Geth 客户端与Mist 钱包 同在 Ropsten网络下,同一账号为啥余额不一样呢?

新手上路,请多包涵

Mist 钱包 Ropsten Testnet网络下
账号: 0xB17000eB180dABEF81Eb110D175e096AF39C1203 有余额

【浏览器查看是有余额的】
https://ropsten.etherscan.io/...

Geth 客户端:

启动脚本:

geth --rpc --rpcapi "db,eth,net,web3,personal,admin,miner" --testnet console


> eth.getBalance('0xb17000eb180dabef81eb110d175e096af39c1203');
0
> eth.blockNumber;
480608

geth 下输出的余额怎么是0? 当前同步区块高度是480608,好像没有同步完全。

geth下testnet 应该等同于 Ropsten吧?看它帮助是这么写的,要不然地址也不能对吧?

其实,我们想实现这样的功能: 在服务端批量对以太坊地址转账ERC20的代币。
思路:先geth启动,提供基于主网RPC,通过基于express包装web3.js封装对以太坊的操作。
这个思路对吗?在私有链上是测试通过了!主网geth 是不是要同步所有数据区块呢?

geth -h

ETHEREUM OPTIONS:
--config value TOML configuration file
--datadir "/Users/junhuazhou/Library/Ethereum" Data directory for the databases and keystore
--keystore Directory for the keystore (default = inside the datadir)
--nousb Disables monitoring for and managing USB hardware wallets
--networkid value Network identifier (integer, 1=Frontier, 2=Morden (disused), 3=Ropsten, 4=Rinkeby) (default: 1)
--testnet Ropsten network: pre-configured proof-of-work test network
--rinkeby Rinkeby network: pre-configured proof-of-authority test network
--syncmode "fast" Blockchain sync mode ("fast", "full", or "light")
--gcmode value Blockchain garbage collection mode ("full", "archive") (default: "full")
--ethstats value Reporting URL of a ethstats service (nodename:secret@host:port)
--identity value Custom node name
--lightserv value Maximum percentage of time allowed for serving LES requests (0-90) (default: 0)
--lightpeers value Maximum number of LES client peers (default: 100)
--lightkdf Reduce key-derivation RAM & CPU usage at some expense of KDF strength

阅读 4.9k
1 个回答
新手上路,请多包涵

我也遇到这个问题了,你怎么解决的

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进