【问题标题】:Balance does not increase by mining in private net私网挖矿不会增加余额
【发布时间】:2018-04-21 00:39:12
【问题描述】:

我无法使用 private_net 从 geth(v1.8.3) 挖掘。 但我不能增加我的账户余额。 我想增加我的帐户余额。

有没有人解决?

我的执行命令如下。

执行此命令后,我确认挖矿开始。

$ geth --datadir ~/private_net --port 7545 --networkid 1111 console 2>>node.log

$ eth.miner()

但余额没有增加。

$ eth.getBalance(eth.accounts[0])

genesis.json

{
  "config": {
        "chainId": 10,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    },
  "alloc"      : {},
  "coinbase"   : "0x0000000000000000000000000000000000000000",
  "difficulty" : "0x20000",
  "extraData"  : "",
  "gasLimit"   : "0x2fefd8",
  "nonce"      : "0x0000000000000042",
  "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp"  : "0x00"
}

【问题讨论】:

    标签: ethereum go-ethereum geth


    【解决方案1】:

    运行矿机的正确命令是:

    miner.start()
    

    您甚至可以指定 CPU 线程数:

    miner.start(7)
    

    然后再次停止:

    miner.stop()
    

    但是,对于私有链,我建议您使用 proof-of-authority 链或 instant-seal 链,例如 Parity 提供的。这样您就不会在密封块上花费太多精力。

    注意,我为 Parity 工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-08
      • 2021-05-27
      • 2021-03-20
      • 2018-06-14
      • 2018-04-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多