Skip to content

Commit caaa0fd

Browse files
committed
net: use std::deque for vSendMsg instead of std::list
The change was introduced as an optimization in 027a852 (dash#3398) but prevents the backport of bitcoin#26844 due to the inability to engage in binary expressions with iterators of `std::list`.
1 parent 2ecba6b commit caaa0fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ class CNode
471471
/** Offset inside the first vSendMsg already sent */
472472
size_t nSendOffset GUARDED_BY(cs_vSend){0};
473473
uint64_t nSendBytes GUARDED_BY(cs_vSend){0};
474-
std::list<std::vector<unsigned char>> vSendMsg GUARDED_BY(cs_vSend);
474+
std::deque<std::vector<unsigned char>> vSendMsg GUARDED_BY(cs_vSend);
475475
std::atomic<size_t> nSendMsgSize{0};
476476
Mutex cs_vSend;
477477
Mutex m_sock_mutex;

0 commit comments

Comments
 (0)