如何启动bootnode?

时间:2019-03-18 09:51:21

标签: javascript ethereum go-ethereum

我正在尝试启动bootnode,但无法获取连接信息。

应该是这样的

bootnode --nodekey=boot.key
INFO [06-22|00:43:07] UDP listener up                          self=enode://1da6f7b4de57b79d1d646d77539665145b5e4076842ec94b9506a508d1621908c93a94d4c6b1474ad43530629a621743ef4af90adc4e9b059bb11c181e539f23@[::]:30301

但是,我总是得到这个。

➜  bootnode bootnode --nodekey boot.key
INFO [03-18|18:39:48.143] New local node record                    seq=1 id=b15d4bb355899b44 ip=<nil> udp=0 tcp=0

genesis.json是这个。

{
  "config": {
    "chainId": 15,
    "homesteadBlock": 0,
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0
  },
  "coinbase"   : "0x0000000000000000000000000000000000000000",
  "difficulty" : "0x1",
  "extraData"  : "",
  "gasLimit"   : "0x2fefd8",
  "nonce"      : "0x0000000000000042",
  "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp"  : "0x00",
  "alloc": {
    "945cd603a6754cb13c3d61d8fe240990f86f9f8a": { "balance": "500000000000000000000000000" },
    "66b4e7be902300f9a15d900822bbd8803be87391": { "balance": "500000000000000000000000000" },
    "104f0d848da3f760dddadc56fc4ab78305110dba": { "balance": "500000000000000000000000000" },
    "addfaa808c59581f04cdadfc0be28ebfb520e839": { "balance": "500000000000000000000000000" },
    "450a8a99bf5ad49db301f6068c619de2400de6f7": { "balance": "500000000000000000000000000" }
  }
}

有什么问题吗?

请给我任何提示吗?

1 个答案:

答案 0 :(得分:0)

如果您想获取bootnode的enode地址,我的朋友很简单,只需在您的命令中添加--writeaddress即可,

bootnode bootnode --nodekey boot.key --writeaddress