mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-10 14:48:46 +02:00
net: Treat raw message bytes as uint8_t
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include <chainparams.h>
|
||||
#include <net.h>
|
||||
|
||||
void ConnmanTestMsg::NodeReceiveMsgBytes(CNode& node, Span<const char> msg_bytes, bool& complete) const
|
||||
void ConnmanTestMsg::NodeReceiveMsgBytes(CNode& node, Span<const uint8_t> msg_bytes, bool& complete) const
|
||||
{
|
||||
assert(node.ReceiveMsgBytes(msg_bytes, complete));
|
||||
if (complete) {
|
||||
@@ -29,11 +29,11 @@ void ConnmanTestMsg::NodeReceiveMsgBytes(CNode& node, Span<const char> msg_bytes
|
||||
|
||||
bool ConnmanTestMsg::ReceiveMsgFrom(CNode& node, CSerializedNetMsg& ser_msg) const
|
||||
{
|
||||
std::vector<unsigned char> ser_msg_header;
|
||||
std::vector<uint8_t> ser_msg_header;
|
||||
node.m_serializer->prepareForTransport(ser_msg, ser_msg_header);
|
||||
|
||||
bool complete;
|
||||
NodeReceiveMsgBytes(node, {(const char*)ser_msg_header.data(), ser_msg_header.size()}, complete);
|
||||
NodeReceiveMsgBytes(node, {(const char*)ser_msg.data.data(), ser_msg.data.size()}, complete);
|
||||
NodeReceiveMsgBytes(node, ser_msg_header, complete);
|
||||
NodeReceiveMsgBytes(node, ser_msg.data, complete);
|
||||
return complete;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user