Changeset View
Changeset View
Standalone View
Standalone View
src/test/util/net.cpp
| Show All 9 Lines | |||||
| #include <net_processing.h> | #include <net_processing.h> | ||||
| #include <netmessagemaker.h> | #include <netmessagemaker.h> | ||||
| #include <span.h> | #include <span.h> | ||||
| #include <vector> | #include <vector> | ||||
| void ConnmanTestMsg::Handshake(CNode &node, bool successfully_connected, | void ConnmanTestMsg::Handshake(CNode &node, bool successfully_connected, | ||||
| ServiceFlags remote_services, | ServiceFlags remote_services, | ||||
| ServiceFlags local_services, | |||||
| NetPermissionFlags permission_flags, | NetPermissionFlags permission_flags, | ||||
| int32_t version, bool relay_txs) { | int32_t version, bool relay_txs) { | ||||
| // This assumes that peerman is the first element in m_msgproc (see D11302) | // This assumes that peerman is the first element in m_msgproc (see D11302) | ||||
| auto &peerman{static_cast<PeerManager &>(*m_msgproc.front())}; | auto &peerman{static_cast<PeerManager &>(*m_msgproc.front())}; | ||||
| auto &connman{*this}; | auto &connman{*this}; | ||||
| const CNetMsgMaker mm{0}; | const CNetMsgMaker mm{0}; | ||||
| peerman.InitializeNode(::GetConfig(), node, node.GetLocalServices()); | peerman.InitializeNode(::GetConfig(), node, local_services); | ||||
| CSerializedNetMsg msg_version{ | CSerializedNetMsg msg_version{ | ||||
| mm.Make(NetMsgType::VERSION, version, | mm.Make(NetMsgType::VERSION, version, | ||||
| Using<CustomUintFormatter<8>>(remote_services), | Using<CustomUintFormatter<8>>(remote_services), | ||||
| // dummy time | // dummy time | ||||
| int64_t{}, | int64_t{}, | ||||
| // dummy addrMe | // dummy addrMe | ||||
| CAddress{}, | CAddress{}, | ||||
| ▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines | |||||