diff --git a/src/seeder/bitcoin.cpp b/src/seeder/bitcoin.cpp --- a/src/seeder/bitcoin.cpp +++ b/src/seeder/bitcoin.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -223,10 +224,16 @@ uint64_t nLocalNonce = BITCOIN_SEED_NONCE; CService myService; CAddress me(myService, ServiceFlags(NODE_NETWORK)); - std::string ver = "/bitcoin-cash-seeder:0.15/"; + + const std::string clientName = gArgs.GetArg("-uaclientname", CLIENT_NAME); + const std::string clientVersion = + gArgs.GetArg("-uaclientversion", FormatVersion(CLIENT_VERSION)); + const std::string userAgent = + FormatUserAgent(clientName, clientVersion, {"seeder"}); + MessageWriter::WriteMessage(vSend, NetMsgType::VERSION, PROTOCOL_VERSION, nLocalServices, GetTime(), you, me, nLocalNonce, - ver, GetRequireHeight()); + userAgent, GetRequireHeight()); Send(); bool res = true;