Connection limits

2 messages Satoshi Nakamoto August 9, 2010 — August 25, 2010
Satoshi Nakamoto August 9, 2010 Source · Permalink

SVN rev 125:

  • Always make 8 outbound connections even if have 8 inbound
  • Limit outbound connections to one per a.b.?.? range
  • Switch -maxconnections=#

I added the (currently undocumented) switch -maxconnections=#.  You shouldn’t use it unless you need to because your router can’t maintain a lot of connections, then try -maxconnections=30.

I haven’t really tested -maxconnections much, could someone test it?

Satoshi Nakamoto August 25, 2010 Source · Permalink

The software tries to maintain 8 outbound connections and allows up to 125 inbound connections. When you’re behind a firewall and can’t receive inbound connections, you can still use Bitcoin fine with just outbound connections. But allowing inbound connections helps the network.

Nodes remember addresses they’ve seen and share them with other nodes. This is how new nodes find the network and how the network stays connected.