Following from PR #23109 The TODO is no longer necessary. Removing it to prevent future confusion.
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-
dougEfresh commented at 8:03 AM on September 29, 2021: contributor
-
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.
- DrahtBot added the label P2P on Sep 29, 2021
-
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.
-
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.
-
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
nMaxOutboundLimitis zero (i.e. no-maxuploadtargetis 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?
-
naumenkogs commented at 6:58 AM on September 30, 2021: member
@dougEfresh I'd say it's a borderline improvement. The fact that
maxuploadtarget=0currently means no limit is unknown forRecordBytesSent, 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.
-
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).
- dougEfresh force-pushed on Oct 5, 2021
-
dougEfresh commented at 6:15 PM on October 5, 2021: contributor
I added
blocks created within past weekto-maxuploadtargethelp message, as I found that useful to know. This was referenced indoc/reduce-traffic.mdI'm not sure what other documentation to add for clarification. Guidance appreciated -
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 :)
-
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.
- dougEfresh closed this on Nov 23, 2021
-
MarcoFalke commented at 8:00 AM on November 26, 2021: member
why was this closed?
-
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.
-
MarcoFalke commented at 2:24 PM on December 10, 2021: member
ping
- dougEfresh reopened this on Dec 10, 2021
- DrahtBot added the label Needs rebase on Dec 10, 2021
-
doc: Remove TODO 'exclude peers with download permission' 2f97c1180b
- dougEfresh force-pushed on Dec 10, 2021
- DrahtBot removed the label Needs rebase on Dec 10, 2021
- MarcoFalke merged this on Dec 11, 2021
- MarcoFalke closed this on Dec 11, 2021
- sidhujag referenced this in commit f70667883f on Dec 11, 2021
- RandyMcMillan referenced this in commit e49e19355d on Dec 23, 2021
- DrahtBot locked this on Dec 11, 2022