Page MenuHomePhabricator

Set seeder user agent in a similar way to the node
ClosedPublic

Authored by thonkle on Sep 13 2021, 21:54.

Details

Reviewers
Fabien
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC4400cf6d32e6: Set seeder user agent in a similar way to the node
Summary

This enables these args in the seeder:

  • -uaclientname defaults to "Bitcoin ABC"
  • -uaclientversion defaults to the current ABC version

The comments section indicates the user agent is a seeder.

Old useragent: /bitcoin-cash-seeder:0.15/
New useragent: /Bitcoin ABC:0.24.2(seeder)/

Test Plan
ninja bitcoind bitcoin-cli bitcoin-seeder check-seeder
./src/bitcoind
./src/seeder/bitcoin-seeder -overridednsseed=localhost
./src/bitcoin-cli getpeerinfo | grep subver

output:

"subver": "/Bitcoin ABC:0.23.8(EB32.0)/",
"subver": "/Bitcoin ABC:0.23.2(EB32.0)/",
"subver": "/Bitcoin ABC:0.23.2(EB32.0)/",
"subver": "/Bitcoin ABC:0.23.7(EB32.0)/",
"subver": "/Bitcoin ABC:0.23.8(EB32.0)/",
"subver": "/Bitcoin ABC:0.23.3(EB32.0)/",
"subver": "/Bitcoin ABC:0.23.2(EB32.0)/",
"subver": "/Bitcoin ABC:0.23.8(EB32.0)/",
"subver": "/Bitcoin ABC:0.23.4(EB32.0)/",
"subver": "/Bitcoin ABC:0.23.8(EB32.0)/",
"subver": "/Bitcoin ABC:0.23.8(EB32.0)/",
"subver": "/Bitcoin ABC:0.24.0(EB32.0)/",
"subver": "/Bitcoin ABC:0.24.2(seeder)/",

Diff Detail