账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    Geth 客户端与Mist 钱包 同在 Ropsten网络下,同一账号为啥余额不一样呢?
    68
    0

    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

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部