lightninglabs / neutrino

Privacy-Preserving Bitcoin Light Client
MIT License
894 stars 182 forks source link

forAllOutboundPeers & forAllPeers #89

Open harshjv opened 6 years ago

harshjv commented 6 years ago

Was taking a look at the source code and found this: https://github.com/lightninglabs/neutrino/blob/e89b36762dd46f4e5c1fc8348b5582265f4a74ce/neutrino.go#L106-L121

Shouldn't forAllOutboundPeers only apply closure to ps.outboundPeers?

cfromknecht commented 6 years ago

All of neutrino’s peers are outbound at the moment. Persistent just means that we will retry a connection to that peer if we get disconnected.

cfromknecht commented 6 years ago

Naming could probably distinguish better, but I believe the behavior is correct