Skip to content

Commit

Permalink
net: use std::deque for vSendMsg instead of std::list
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
kwvg committed Sep 4, 2024
1 parent 2ecba6b commit caaa0fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ class CNode
/** 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<std::vector<unsigned char>> vSendMsg GUARDED_BY(cs_vSend);
std::deque<std::vector<unsigned char>> vSendMsg GUARDED_BY(cs_vSend);
std::atomic<size_t> nSendMsgSize{0};
Mutex cs_vSend;
Mutex m_sock_mutex;
Expand Down

0 comments on commit caaa0fd

Please sign in to comment.