decred / dcrd

Decred daemon in Go (golang).

Home Page:https://decred.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Max peers settings doesn't look it works

dema501 opened this issue · comments

I have dcrd.conf

; Maximum number of inbound and outbound peers.
maxpeers=16

;
addpeer=xx1.xx1.xx1.xx1:9108
addpeer=xx2.xx2.xx2.xx2:9108
addpeer=xx3.xx3.xx3.xx3:9108
addpeer=xx4.xx4.xx4.xx3:9108
addpeer=xx5.xx5.xx5.xx4:9108

when I run:
dcrctl getpeerinfo | grep -c '"addr"'

"addr": "xx1.xx1.xx1.xx1:9108",
"addr": "xx2.xx2.xx2.xx2:9108",
"addr": "xx3.xx3.xx3.xx3:9108",
"addr": "xx4.xx4.xx4.xx3:9108",
"addr": "xx5.xx5.xx5.xx4:9108",
...
3 more peer node 

It doesn't matter how many times I run dcrctl getpeerinfo it always gives me 8 total

dcrd -V
dcrd version 1.6.2+release (Go version go1.16.4 freebsd/amd64)

The maximum number of outbound peers is locked to 8. Increasing the maxpeers parameter above that only allows more inbound peers.

The number of outbound is locked to 8 because any number higher than that does not help your node while simultaneously taking valuable inbound slots away from other peers.

Closing because it's working as intended as previously described.