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
  1. jtimon commented at 10:51 pm on January 31, 2017: contributor
    Also 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).
  2. Net: CConnman: Make some methods const d45955fa09
  3. Net: Make CNetMsgMaker more const fc7f2ffad4
  4. Net: pass interruptMsgProc as const where possible 0729102f99
  5. 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.
  6. TheBlueMatt commented at 0:03 am on February 1, 2017: member
    General concept ack, with the exception of removing the flagInterruptMsg pass (but please do make it const)
  7. jtimon commented at 1:18 am on February 1, 2017: contributor
    Great, it seems I was right on leaving the last commit separated, I’ll leave it out.
  8. jtimon force-pushed on Feb 1, 2017
  9. jonasschnelli added the label Refactoring on Feb 1, 2017
  10. in 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?
  11. TheBlueMatt commented at 10:31 pm on February 1, 2017: member
    utACK 0729102f99241b9716456ad40bf778c09f650b1b (+/- SocketSendData being made const).
  12. laanwj commented at 1:34 pm on February 6, 2017: member
    utACK 0729102
  13. laanwj merged this on Feb 6, 2017
  14. laanwj closed this on Feb 6, 2017

  15. laanwj referenced this in commit 09e0c28f85 on Feb 6, 2017
  16. codablock referenced this in commit 7026c35208 on Jan 19, 2018
  17. codablock referenced this in commit 3f1929fb0d on Jan 23, 2018
  18. gladcow referenced this in commit 87387c4306 on Mar 8, 2018
  19. gladcow referenced this in commit 80c2f36c5d on Mar 13, 2018
  20. andvgal referenced this in commit 423788ba89 on Jan 6, 2019
  21. CryptoCentric referenced this in commit 1a1424842b on Feb 27, 2019
  22. MarcoFalke locked this on Sep 8, 2021

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 site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me