Overwrite db services with version message results
Summary:
Seeder dumps incorrect service flags under these circumstances:
- When a seed node is provided manually with -overridednsseed
- When a seed node address is fetched from other seeders
The service flags may be corrected only if the node is re-rumored via getaddr by some other node. This does not happen for situation 1 above unless the node is public facing.
This patch makes version messages set the service bits correctly.
This is a backport of https://github.com/sipa/bitcoin-seeder/commit/a1e93942842316b60685008f589290d5bdde2058
Test Plan:
./bitcoind -daemon ./bitcoin-seeder -host=127.0.0.1 -ns=localhost -mbox=thonkle@protonmail.com -port=5555 -overridednsseed=127.0.0.1 cat dnsseed.dump
Result without patch:
127.0.0.1:8333 0 1634593390 12.97% 3.41% 1.15% 0.17% 0.04% 709666 00000000 70016 "/Bitcoin ABC:0.24.3(EB32.0)/"
Result with patch:
127.0.0.1:8333 0 1634593493 12.97% 3.41% 1.15% 0.17% 0.04% 709666 00000404 70016 "/Bitcoin ABC:0.24.3(EB32.0)/"
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10366