启动私有链后不停出现Looking for peers
INFO [04-12|10:39:39.455] Started P2P networking self=enode://...
INFO [04-12|10:39:50.156] Looking for peers peercount=0 tried=36 static=0
INFO [04-12|10:40:00.551] Looking for peers peercount=0 tried=45 static=0
INFO [04-12|10:40:10.978] Looking for peers peercount=0 tried=32 static=0
INFO [04-12|10:40:21.100] Looking for peers peercount=1 tried=37 static=0
两个方法:
1.- -nodiscover 关闭p2p网络的自动发现,但增加节点时要手动添加。
geth --datadir ./data --networkid 108 console --nodiscover
2.将Looking for peers输出到文件中
geth --datadir ./data --networkid 108 console 2>output.txt
挖矿以及其他提示信息就在output.txt里了。控制台输出如下图:
> miner.start()
null
> miner.stop()
null
>