HomePhabricator

Add --address, bind to specific address

Description

Add --address, bind to specific address

Summary:
Backport of https://github.com/sipa/bitcoin-seeder/pull/84

Some configurations need to bind a specific address. See issues referenced in the original pull request.

I had to modify the original pull request to match the ABC code base.

Test Plan:
Test cases:

./bitcoin-seeder -host=localhost -ns=localhost -mbox=thonkle@protonmail.com -port=5555
./bitcoin-seeder -host=localhost -ns=localhost -mbox=thonkle@protonmail.com -port=5555 -address=127.0.0.1
./bitcoin-seeder -host=localhost -ns=localhost -mbox=thonkle@protonmail.com -port=5555 -address=::1

Results of sudo netstat -pln | grep 5555 for each test case:

udp6       0      0 :::5555                 :::*                                18998/./bitcoin-see
udp6       0      0 127.0.0.1:5555          :::*                                19121/./bitcoin-see
udp6       0      0 ::1:5555                :::*                                19361/./bitcoin-see

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10186

Details

Provenance
uhliksk <uhlik@uhlik.sk>Authored on Aug 6 2020, 01:23
thonkleCommitted on Sep 29 2021, 17:24
thonklePushed on Sep 29 2021, 17:24
Reviewer
Restricted Owners Package
Differential Revision
D10186: Add --address, bind to specific address
Parents
rABC6f244fbea854: add a linter for python imports
Branches
Unknown
Tags
Unknown