Rather than having these casts in the Make()
call, perhaps it’s a bit more legible as:
0--- a/src/net_processing.cpp
1+++ b/src/net_processing.cpp
2@@ -1034,18 +1034,19 @@ void PeerManagerImpl::PushNodeVersion(CNode& pnode, int64_t nTime)
3 // Note that pnode->GetLocalServices() is a reflection of the local
4 // services we were offering when the CNode object was created for this
5 // peer.
6- ServiceFlags nLocalNodeServices = pnode.GetLocalServices();
7+ auto my_services = static_cast<uint64_t>(pnode.GetLocalServices());
8 uint64_t nonce = pnode.GetLocalNonce();
9 const int nNodeStartingHeight{m_best_height};
10 NodeId nodeid = pnode.GetId();
11 CAddress addr = pnode.addr;
12
13 CService addr_you = addr.IsRoutable() && !IsProxy(addr) && addr.IsAddrV1Compatible() ? addr : CService();
14+ auto your_services = static_cast<uint64_t>(addr.nServices);
15
16 const bool tx_relay = !m_ignore_incoming_txs && pnode.m_tx_relay != nullptr;
17- m_connman.PushMessage(&pnode, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::VERSION, PROTOCOL_VERSION, (uint64_t)nLocalNodeServices, nTime,
18- (uint64_t)addr.nServices, addr_you, // Together the pre-version-31402 serialization of CAddress "addrYou" (without nTime)
19- (uint64_t)nLocalNodeServices, CService(), // Together the pre-version-31402 serialization of CAddress "addrMe" (without nTime)
20+ m_connman.PushMessage(&pnode, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::VERSION, PROTOCOL_VERSION, my_services, nTime,
21+ your_services, addr_you, // Together the pre-version-31402 serialization of CAddress "addrYou" (without nTime)
22+ my_services, CService(), // Together the pre-version-31402 serialization of CAddress "addrMe" (without nTime)
23 nonce, strSubVersion, nNodeStartingHeight, tx_relay));
24
25 if (fLogIPs) {