besu
besu copied to clipboard
Currently every 30 seconds we are trying to connect to each peer in the PeerTable. Check that behaviour.
Description
In DefaultP2PNetwork.java in method attemptPeerConnections we are trying to connect to each bonded peer that is in our PeerTable. This method is called every 30 seconds as scheduled in line 275:
peerConnectionScheduler.scheduleWithFixedDelay(
this::attemptPeerConnections, checkConnectionsSec, checkConnectionsSec, TimeUnit.SECONDS);
Trying to connect to these peers could be disabled if we do have enough peers (max peers), or maybe we could do that less often.