Net: Turn some methods and params/variables const #9659
pull jtimon wants to merge 3 commits into bitcoin:master from jtimon:0.14-net-more-const changing 5 files +19 −19-
jtimon commented at 10:51 pm on January 31, 2017: contributorAlso remove currently unused interruptMsgProc param from SendMessages. I guess some squashing can be done (but I’m worried that interruptMsgProc is planned to be used in SendMessages later).
-
Net: CConnman: Make some methods const d45955fa09
-
Net: Make CNetMsgMaker more const fc7f2ffad4
-
Net: pass interruptMsgProc as const where possible 0729102f99
-
in src/net.cpp: in 9c0d42177a outdated
1870@@ -1871,7 +1871,7 @@ void CConnman::ThreadMessageHandler() 1871 // Send messages 1872 { 1873 LOCK(pnode->cs_sendProcessing); 1874- GetNodeSignals().SendMessages(pnode, *this, flagInterruptMsgProc); 1875+ GetNodeSignals().SendMessages(pnode, *this);
TheBlueMatt commented at 11:52 pm on January 31, 2017:Even if we dont use it now, I’m not sure we want to get rid of passing flagInterruptMsgProc through…there is a strong case for using it in 0.15.TheBlueMatt commented at 0:03 am on February 1, 2017: memberGeneral concept ack, with the exception of removing the flagInterruptMsg pass (but please do make it const)jtimon commented at 1:18 am on February 1, 2017: contributorGreat, it seems I was right on leaving the last commit separated, I’ll leave it out.jtimon force-pushed on Feb 1, 2017jonasschnelli added the label Refactoring on Feb 1, 2017in src/net.cpp: in 0729102f99
753@@ -754,7 +754,7 @@ const uint256& CNetMessage::GetMessageHash() const 754 755 756 // requires LOCK(cs_vSend) 757-size_t CConnman::SocketSendData(CNode *pnode)
TheBlueMatt commented at 9:41 pm on February 1, 2017:Hmm…while technicall const for the CConnman, I’m not sure this “should be const” given that it is writing data to the peer itself…
jtimon commented at 11:10 pm on February 2, 2017:Well, writing to the peer itself here is writing to pnode, which isn’t const, no?TheBlueMatt commented at 10:31 pm on February 1, 2017: memberutACK 0729102f99241b9716456ad40bf778c09f650b1b (+/- SocketSendData being made const).laanwj commented at 1:34 pm on February 6, 2017: memberutACK 0729102laanwj merged this on Feb 6, 2017laanwj closed this on Feb 6, 2017
laanwj referenced this in commit 09e0c28f85 on Feb 6, 2017codablock referenced this in commit 7026c35208 on Jan 19, 2018codablock referenced this in commit 3f1929fb0d on Jan 23, 2018gladcow referenced this in commit 87387c4306 on Mar 8, 2018gladcow referenced this in commit 80c2f36c5d on Mar 13, 2018andvgal referenced this in commit 423788ba89 on Jan 6, 2019CryptoCentric referenced this in commit 1a1424842b on Feb 27, 2019MarcoFalke locked this on Sep 8, 2021Labels
Refactoring
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 21:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 21:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me