MCPcopy Create free account
hub / github.com/ElementsProject/elements / NodeReceiveMsgBytes

Method NodeReceiveMsgBytes

src/test/util/net.cpp:13–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <vector>
12
13void ConnmanTestMsg::NodeReceiveMsgBytes(CNode& node, Span<const uint8_t> msg_bytes, bool& complete) const
14{
15 assert(node.ReceiveMsgBytes(msg_bytes, complete));
16 if (complete) {
17 size_t nSizeAdded = 0;
18 auto it(node.vRecvMsg.begin());
19 for (; it != node.vRecvMsg.end(); ++it) {
20 // vRecvMsg contains only completed CNetMessage
21 // the single possible partially deserialized message are held by TransportDeserializer
22 nSizeAdded += it->m_raw_message_size;
23 }
24 {
25 LOCK(node.cs_vProcessMsg);
26 node.vProcessMsg.splice(node.vProcessMsg.end(), node.vRecvMsg, node.vRecvMsg.begin(), it);
27 node.nProcessQueueSize += nSizeAdded;
28 node.fPauseRecv = node.nProcessQueueSize > nReceiveFloodSize;
29 }
30 }
31}
32
33bool ConnmanTestMsg::ReceiveMsgFrom(CNode& node, CSerializedNetMsg& ser_msg) const
34{

Callers

nothing calls this directly

Calls 3

ReceiveMsgBytesMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected