refactor: NetMsg::Make() without nVersion

The nVersion field is unused, so remove it.

This is also required for future commits.

Also, add PushMessage aliases in PeerManagerImpl to make calling code
less verbose.

Co-Authored-By: Anthony Towns <aj@erisian.com.au>
This commit is contained in:
MarcoFalke
2023-11-16 15:43:15 +01:00
parent 66669da4a5
commit fa9b5f4fe3
5 changed files with 74 additions and 97 deletions

View File

@@ -88,7 +88,7 @@ FUZZ_TARGET(p2p_transport_serialization, .init = initialize_p2p_transport_serial
assert(msg.m_time == m_time);
std::vector<unsigned char> header;
auto msg2 = CNetMsgMaker{msg.m_recv.GetVersion()}.Make(msg.m_type, Span{msg.m_recv});
auto msg2 = NetMsg::Make(msg.m_type, Span{msg.m_recv});
bool queued = send_transport.SetMessageToSend(msg2);
assert(queued);
std::optional<bool> known_more;