6fad8eaf5a
* [p2p/pex] connect to more than 10 peers also, remove DefaultMinNumOutboundPeers because a) I am not sure it's needed b) it's super confusing look closely ``` maxPeers := sw.config.MaxNumPeers - DefaultMinNumOutboundPeers if maxPeers <= sw.peers.Size() { sw.Logger.Info("Ignoring inbound connection: already have enough peers", "address", inConn.RemoteAddr().String(), "numPeers", sw.peers.Size(), "max", maxPeers) ``` we print maxPeers = config.MaxPeers - DefaultMinNumOutboundPeers. So we may not have enough peers even though we say we have enough. Refs #2130 * update spec * replace MaxNumPeers with MaxNumInboundPeers/MaxNumOutboundPeers Refs #2130 * update changelog * make max rpc conns formula visible to users * update spec * docs: note max outbound peers excludes persistent |
||
---|---|---|
.. | ||
conn | ||
dummy | ||
pex | ||
trust | ||
upnp | ||
README.md | ||
base_reactor.go | ||
errors.go | ||
fuzz.go | ||
key.go | ||
key_test.go | ||
listener.go | ||
listener_test.go | ||
metrics.go | ||
netaddress.go | ||
netaddress_test.go | ||
node_info.go | ||
peer.go | ||
peer_set.go | ||
peer_set_test.go | ||
peer_test.go | ||
switch.go | ||
switch_test.go | ||
test_util.go | ||
types.go | ||
version.go | ||
wire.go |
README.md
p2p
The p2p package provides an abstraction around peer-to-peer communication.
Docs:
- Connection for details on how connections and multiplexing work
- Peer for details on peer ID, handshakes, and peer exchange
- Node for details about different types of nodes and how they should work
- Pex for details on peer discovery and exchange
- Config for details on some config option