In the function connections_maker in net_node.inl a node selects the peers to which it tries to create a connection. This computation seems to be important in which order we select the peers: either from anchor list, white list and grey list or from grey list and white list. However, I have some troubles to figure out when we select which order. Can anybody explain that?


1 Answer 1


Anchor first, then white, then gray.

  • Yes, I agree. But there is an else branch: grey list and then white list. My question is when do we take this else branch?
    – Jan Telov
    May 20, 2019 at 17:03
  • 1
    That else branch is hit if we have exhausted our expected white connection count, so it then tries some grays. If we specified we wanted to maintain a total of 10 outgoing peers, and of those, we wanted to say try 3 whites, once we have 3 whites connected, then try the grays.
    – jtgrassie
    May 21, 2019 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.