doc: Remove TODO 'exclude peers with download permission' #23128

pull dougEfresh wants to merge 1 commits into bitcoin:master from dougEfresh:remove-todo-max-dl-permission changing 1 files +0 −1
  1. dougEfresh commented at 8:03 AM on September 29, 2021: contributor

    Following from PR #23109 The TODO is no longer necessary. Removing it to prevent future confusion.

  2. MarcoFalke commented at 8:20 AM on September 29, 2021: member

    Btw, the TODO has been added by @jonasschnelli in commit 872fee3fccc8b33b9af0a401b5f85ac5504b57eb. It wasn't added by me.

  3. DrahtBot added the label P2P on Sep 29, 2021
  4. naumenkogs commented at 9:52 AM on September 29, 2021: member

    Sorry for insisting, but I think a documentation improvement is a necessary step while touching these lines.

  5. laanwj commented at 10:21 AM on September 29, 2021: member

    Btw, the TODO has been added by @jonasschnelli in commit 872fee3. It wasn't added by me.

    Whoops, blame git blame.

  6. dougEfresh commented at 12:44 PM on September 29, 2021: contributor

    As I was writing some docs,I realized that GetTime is always called, even when nMaxOutboundLimit is zero (i.e. no -maxuploadtarget is set)

    Shouldn't the code look like this:

        if (nMaxOutboundLimit) {
            const auto now = GetTime<std::chrono::seconds>();
            if (nMaxOutboundCycleStartTime + MAX_UPLOAD_TIMEFRAME < now)
            {
                // timeframe expired, reset cycle
                nMaxOutboundCycleStartTime = now;
                nMaxOutboundTotalBytesSentInCycle = 0;
            }
        }
    

    Or should we call GetMaxOutboundTarget ? There's a lock in that method. Maybe that's too expensive of a call?

  7. naumenkogs commented at 6:58 AM on September 30, 2021: member

    @dougEfresh I'd say it's a borderline improvement. The fact that maxuploadtarget=0 currently means no limit is unknown for RecordBytesSent, and that's not necessarily bad.

    If you want the function to be aware of this policy, yeah, your code will work, if you accompany it with the comment. One thing to keep in mind that nMaxOutboundCycleStartTime, as exposed to the user, would be different from other peers, because it will be never updated. Might be counter-intuitive.

    So, yeah, I'm not sure it's worth it.

  8. laanwj commented at 6:56 AM on October 1, 2021: member

    I think for this PR it makes sense to limit it to documentation improvement. Changing the logic can be done later (or not).

  9. dougEfresh force-pushed on Oct 5, 2021
  10. dougEfresh commented at 6:15 PM on October 5, 2021: contributor

    I added blocks created within past week to -maxuploadtarget help message, as I found that useful to know. This was referenced in doc/reduce-traffic.md I'm not sure what other documentation to add for clarification. Guidance appreciated

  11. naumenkogs commented at 10:42 AM on October 6, 2021: member

    I think it would be great to integrate the comment I provided here, perhaps in a better shape and potentially in different related places of the codebase :)

  12. DrahtBot commented at 11:18 PM on October 14, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #23249 (util: ParseByteUnits - Parse a string with suffix unit by dougEfresh)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  13. dougEfresh closed this on Nov 23, 2021

  14. MarcoFalke commented at 8:00 AM on November 26, 2021: member

    why was this closed?

  15. dougEfresh commented at 3:19 PM on November 26, 2021: contributor

    I'm going to remove the my forked repo, I can open it after I rename.

  16. MarcoFalke commented at 2:24 PM on December 10, 2021: member

    ping

  17. dougEfresh reopened this on Dec 10, 2021

  18. DrahtBot added the label Needs rebase on Dec 10, 2021
  19. doc: Remove TODO 'exclude peers with download permission' 2f97c1180b
  20. dougEfresh force-pushed on Dec 10, 2021
  21. DrahtBot removed the label Needs rebase on Dec 10, 2021
  22. MarcoFalke merged this on Dec 11, 2021
  23. MarcoFalke closed this on Dec 11, 2021

  24. sidhujag referenced this in commit f70667883f on Dec 11, 2021
  25. RandyMcMillan referenced this in commit e49e19355d on Dec 23, 2021
  26. DrahtBot locked this on Dec 11, 2022

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-29 03:14 UTC

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