mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-08 21:59:10 +02:00
net: Treat raw message bytes as uint8_t
This commit is contained in:
@@ -128,7 +128,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
||||
case 11: {
|
||||
const std::vector<uint8_t> b = ConsumeRandomLengthByteVector(fuzzed_data_provider);
|
||||
bool complete;
|
||||
node.ReceiveMsgBytes({(const char*)b.data(), b.size()}, complete);
|
||||
node.ReceiveMsgBytes(b, complete);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
||||
{
|
||||
// Construct deserializer, with a dummy NodeId
|
||||
V1TransportDeserializer deserializer{Params(), (NodeId)0, SER_NETWORK, INIT_PROTO_VERSION};
|
||||
Span<const char> msg_bytes{(const char*)buffer.data(), buffer.size()};
|
||||
Span<const uint8_t> msg_bytes{buffer};
|
||||
while (msg_bytes.size() > 0) {
|
||||
const int handled = deserializer.Read(msg_bytes);
|
||||
if (handled < 0) {
|
||||
|
||||
Reference in New Issue
Block a user