don't enforce maxuploadtarget's disconnect for whitelisted peers #6984

pull jonasschnelli wants to merge 3 commits into bitcoin:master from jonasschnelli:2015/11/maxupload_whitebind changing 4 files +45 −5
  1. jonasschnelli commented at 9:13 AM on November 11, 2015: contributor

    No description provided.

  2. jonasschnelli force-pushed on Nov 11, 2015
  3. jonasschnelli force-pushed on Nov 11, 2015
  4. in src/main.cpp:None in 3fbe4933ef outdated
    3855 | @@ -3856,8 +3856,9 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
    3856 |                      }
    3857 |                  }
    3858 |                  // disconnect node in case we have reached the outbound limit for serving historical blocks
    3859 | +                // never disconnect whitelisted nodes
    3860 |                  static const int nOneWeek = 7 * 24 * 60 * 60; // assume > 1 week = historical
    3861 | -                if (send && CNode::OutboundTargetReached(true) && ( ((pindexBestHeader != NULL) && (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() > nOneWeek)) || inv.type == MSG_FILTERED_BLOCK) )
    3862 | +                if (send && CNode::OutboundTargetReached(true) && ( ((pindexBestHeader != NULL) && (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() > nOneWeek)) || inv.type == MSG_FILTERED_BLOCK) && !pfrom->fWhitelisted )
    


    sipa commented at 9:42 AM on November 11, 2015:

    Unnecessary space before )


    jonasschnelli commented at 9:43 AM on November 11, 2015:

    True. Force-push removed.

  5. sipa commented at 9:42 AM on November 11, 2015: member

    utACK

  6. jonasschnelli force-pushed on Nov 11, 2015
  7. gmaxwell commented at 9:51 AM on November 11, 2015: contributor

    utACK

  8. fanquake commented at 10:55 AM on November 11, 2015: member

    utACK @jonasschnelli has documentation written, it just needs to be included here.

  9. laanwj added the label P2P on Nov 11, 2015
  10. laanwj commented at 1:57 PM on November 11, 2015: member

    Concept ACK

  11. instagibbs commented at 1:27 PM on November 12, 2015: member

    utACK

  12. in qa/rpc-tests/maxuploadtarget.py:None in 4566e5b7c8 outdated
     259 | +            test_nodes[i].add_connection(connections[i])
     260 | +
     261 | +        NetworkThread().start() # Start up network handling in another thread
     262 | +        [x.wait_for_verack() for x in test_nodes]
     263 | +
     264 | +        #retrieve 20 blocks which should be enought to break the 1MB limit
    


    sipa commented at 1:37 PM on November 12, 2015:

    nit: enough


    jonasschnelli commented at 1:40 PM on November 12, 2015:

    Thanks. Fixed.

  13. sipa commented at 1:38 PM on November 12, 2015: member

    utACK

  14. jonasschnelli force-pushed on Nov 12, 2015
  15. in src/main.cpp:None in 5a2984f5c6 outdated
    3855 | @@ -3856,8 +3856,9 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
    3856 |                      }
    3857 |                  }
    3858 |                  // disconnect node in case we have reached the outbound limit for serving historical blocks
    3859 | +                // never disconnect whitelisted nodes
    


    MarcoFalke commented at 4:42 PM on November 13, 2015:

    Is this already mentioned in the release notes and/or documentation?


    gmaxwell commented at 7:59 PM on November 13, 2015:

    I think it's more or less adequately explained by the documentation for whitelist.

    Though the release note for maxupload target could mention it too.

  16. gmaxwell commented at 8:00 PM on November 13, 2015: contributor

    Also tested, works good. (I gave a utACK above). Please update docs/release notes as you see fit.

  17. don't enforce maxuploadtargets disconnect for whitelisted peers d61fcff071
  18. [docs] rename reducetraffic.md to reduce-traffic.md 5760749ed8
  19. jonasschnelli force-pushed on Nov 13, 2015
  20. jonasschnelli commented at 8:14 PM on November 13, 2015: contributor

    I have added a short documentation in the release-notes.md and in the reduce-traffic.md doc (feel free to overhaul). Also i smuggled in a rename from reducetraffic.md to reduce-traffic.md (which would be silly to do in a separated PR). All other doc filename use the same pattern.

  21. add documentation for exluding whitelistes peer from maxuploadtarget e495ed5f08
  22. jonasschnelli force-pushed on Nov 14, 2015
  23. jonasschnelli commented at 7:43 AM on November 14, 2015: contributor

    Thanks. Fixed.

  24. gmaxwell merged this on Nov 14, 2015
  25. gmaxwell closed this on Nov 14, 2015

  26. gmaxwell referenced this in commit 9ffc687288 on Nov 14, 2015
  27. zkbot referenced this in commit fd0d435f72 on Feb 18, 2021
  28. zkbot referenced this in commit 1d378b1eb0 on Feb 18, 2021
  29. DrahtBot 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: 2026-04-13 18:15 UTC

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