aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2020-10-18 14:45:35 +0200
committerVasil Dimov <vd@FreeBSD.org>2022-03-02 15:42:37 +0100
commit0cfc0cd32239d3c08d2121e028b297022450b320 (patch)
tree5f385c8afa2d2efc9435579e3b5a3b5651e1c7c5 /src/net.h
parentf98cdcb3574ee661223e1a09e1762b2cc85fab2f (diff)
downloadbitcoin-0cfc0cd32239d3c08d2121e028b297022450b320.tar.xz
net: fix GetListenPort() to derive the proper port
`GetListenPort()` uses a simple logic: "if `-port=P` is given, then we must be listening on `P`, otherwise we must be listening on `8333`". This is however not true if `-bind=` has been provided with `:port` part or if `-whitebind=` has been provided. Thus, extend `GetListenPort()` to return the port from `-bind=` or `-whitebind=`, if any. Fixes https://github.com/bitcoin/bitcoin/issues/20184 (cases 1. 2. 3. 5.)
Diffstat (limited to 'src/net.h')
0 files changed, 0 insertions, 0 deletions