From caaa0fda01c224790c60d2d81fa1b18a7d262e6e Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Sun, 16 Jun 2024 11:55:00 +0000 Subject: [PATCH] net: use `std::deque` for `vSendMsg` instead of `std::list` The change was introduced as an optimization in 027a852a (dash#3398) but prevents the backport of bitcoin#26844 due to the inability to engage in binary expressions with iterators of `std::list`. --- src/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.h b/src/net.h index 0277b27e10..4e1ea87b7f 100644 --- a/src/net.h +++ b/src/net.h @@ -471,7 +471,7 @@ public: /** Offset inside the first vSendMsg already sent */ size_t nSendOffset GUARDED_BY(cs_vSend){0}; uint64_t nSendBytes GUARDED_BY(cs_vSend){0}; - std::list> vSendMsg GUARDED_BY(cs_vSend); + std::deque> vSendMsg GUARDED_BY(cs_vSend); std::atomic nSendMsgSize{0}; Mutex cs_vSend; Mutex m_sock_mutex;