Skip to content

Commit

Permalink
Use std::list for vSendMsg
Browse files Browse the repository at this point in the history
std::deque is indexed internally, which gives some unnecessary overhead
when removing the front element.
  • Loading branch information
codablock committed Apr 7, 2020
1 parent a3bc3fd commit 027a852
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 @@ -770,7 +770,7 @@ class CNode
size_t nSendSize; // total size of all vSendMsg entries
size_t nSendOffset; // offset inside the first vSendMsg already sent
uint64_t nSendBytes;
std::deque<std::vector<unsigned char>> vSendMsg;
std::list<std::vector<unsigned char>> vSendMsg;
CCriticalSection cs_vSend;
CCriticalSection cs_hSocket;
CCriticalSection cs_vRecv;
Expand Down

0 comments on commit 027a852

Please sign in to comment.