net: fix maxuploadtarget setting #8707

pull theuni wants to merge 1 commits into bitcoin:master from theuni:fix-maxupload changing 3 files +14 −3
  1. theuni commented at 0:47 am on September 13, 2016: member

    This was broken by 63cafa6329e1a.

    Note that while this fixes the settings, it doesn’t fix the actual usage of -maxuploadtarget completely, as there is currently a bug in the nOptimisticBytesWritten accounting that causes a delayed response if the target is reached. That bug will be addressed separately.

    Thanks to @morcos for reporting.

  2. jonasschnelli added the label P2P on Sep 13, 2016
  3. in src/net.h: in 86ce4ec7f6 outdated
    71@@ -72,6 +72,8 @@ static const size_t SETASKFOR_MAX_SZ = 2 * MAX_INV_SZ;
    72 static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 125;
    73 /** The default for -maxuploadtarget. 0 = Unlimited */
    74 static const uint64_t DEFAULT_MAX_UPLOAD_TARGET = 0;
    75+/** The default for -maxuploadtarget. 0 = Unlimited */
    


    MarcoFalke commented at 10:06 am on September 13, 2016:
    I think the comment is wrong?

    theuni commented at 3:56 pm on September 13, 2016:
    Whoops, c/p and forgot to actually fill it in. Will fix.
  4. jonasschnelli commented at 4:14 pm on September 13, 2016: contributor
    Could get affected/obsolete by #8712
  5. MarcoFalke commented at 4:24 pm on September 13, 2016: member
    Right, needs a rebase after #8712 probably.
  6. theuni commented at 5:47 pm on September 13, 2016: member
    Roger, will rebase after merge.
  7. net: fix maxuploadtarget setting
    This was broken by 63cafa6329e1a.
    
    Note that while this fixes the settings, it doesn't fix the actual usage of
    -maxuploadtarget completely, as there is currently a bug in the
    nOptimisticBytesWritten accounting that causes a delayed response if the target
    is reached. That bug will be addressed separately.
    f3552da813
  8. in src/net.cpp: in 86ce4ec7f6 outdated
    2362@@ -2362,11 +2363,7 @@ void CConnman::RecordBytesSent(uint64_t bytes)
    2363 void CConnman::SetMaxOutboundTarget(uint64_t limit)
    2364 {
    2365     LOCK(cs_totalBytesSent);
    2366-    uint64_t recommendedMinimum = (nMaxOutboundTimeframe / 600) * MAX_BLOCK_SERIALIZED_SIZE;
    


    MarcoFalke commented at 9:45 am on September 14, 2016:
    Needs rebase to solve silent merge conflict.
  9. theuni force-pushed on Sep 14, 2016
  10. theuni commented at 5:16 pm on September 14, 2016: member
    Rebased after #8712 and fixed the comment.
  11. MarcoFalke commented at 7:29 pm on September 16, 2016: member
    Concept ACK. Can confirm that this together with #8708 fixes the test failure.
  12. laanwj approved
  13. laanwj merged this on Sep 19, 2016
  14. laanwj closed this on Sep 19, 2016

  15. laanwj referenced this in commit f07424a671 on Sep 19, 2016
  16. codablock referenced this in commit 7b69da7941 on Sep 19, 2017
  17. codablock referenced this in commit af5d18ad5c on Jan 11, 2018
  18. andvgal referenced this in commit 7104138210 on Jan 6, 2019
  19. 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-12-19 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me