aboutsummaryrefslogtreecommitdiff
path: root/src/test/util
diff options
context:
space:
mode:
authordergoegge <n.goeggi@gmail.com>2023-03-14 17:38:46 +0100
committerdergoegge <n.goeggi@gmail.com>2023-03-19 14:34:37 +0100
commitcc5cdf877666c232a94f03faaf430cbeb6968372 (patch)
treefec128374168a131e9d4dcb5f29c5965e04e7e33 /src/test/util
parentad44aa5c64d4ee5f31c867fda26350ab560575b7 (diff)
[net] Deduplicate marking received message for processing
Diffstat (limited to 'src/test/util')
-rw-r--r--src/test/util/net.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/test/util/net.cpp b/src/test/util/net.cpp
index ac5dfe9e73..070a6a1c50 100644
--- a/src/test/util/net.cpp
+++ b/src/test/util/net.cpp
@@ -66,18 +66,7 @@ void ConnmanTestMsg::NodeReceiveMsgBytes(CNode& node, Span<const uint8_t> msg_by
{
assert(node.ReceiveMsgBytes(msg_bytes, complete));
if (complete) {
- size_t nSizeAdded = 0;
- for (const auto& msg : node.vRecvMsg) {
- // vRecvMsg contains only completed CNetMessage
- // the single possible partially deserialized message are held by TransportDeserializer
- nSizeAdded += msg.m_raw_message_size;
- }
- {
- LOCK(node.cs_vProcessMsg);
- node.vProcessMsg.splice(node.vProcessMsg.end(), node.vRecvMsg);
- node.nProcessQueueSize += nSizeAdded;
- node.fPauseRecv = node.nProcessQueueSize > nReceiveFloodSize;
- }
+ node.MarkReceivedMsgsForProcessing(nReceiveFloodSize);
}
}