-
Notifications
You must be signed in to change notification settings - Fork 36.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't enforce maxuploadtarget's disconnect for whitelisted peers #6984
don't enforce maxuploadtarget's disconnect for whitelisted peers #6984
Conversation
bba177b
to
3fbe493
Compare
static const int nOneWeek = 7 * 24 * 60 * 60; // assume > 1 week = historical | ||
if (send && CNode::OutboundTargetReached(true) && ( ((pindexBestHeader != NULL) && (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() > nOneWeek)) || inv.type == MSG_FILTERED_BLOCK) ) | ||
if (send && CNode::OutboundTargetReached(true) && ( ((pindexBestHeader != NULL) && (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() > nOneWeek)) || inv.type == MSG_FILTERED_BLOCK) && !pfrom->fWhitelisted ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary space before )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Force-push removed.
utACK |
3fbe493
to
4566e5b
Compare
utACK |
utACK @jonasschnelli has documentation written, it just needs to be included here. |
Concept ACK |
utACK |
NetworkThread().start() # Start up network handling in another thread | ||
[x.wait_for_verack() for x in test_nodes] | ||
|
||
#retrieve 20 blocks which should be enought to break the 1MB limit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Fixed.
utACK |
4566e5b
to
5a2984f
Compare
@@ -3856,8 +3856,9 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam | |||
} | |||
} | |||
// disconnect node in case we have reached the outbound limit for serving historical blocks | |||
// never disconnect whitelisted nodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this already mentioned in the release notes and/or documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Also tested, works good. (I gave a utACK above). Please update docs/release notes as you see fit. |
5a2984f
to
1aa57ac
Compare
I have added a short documentation in the |
1aa57ac
to
e495ed5
Compare
Thanks. Fixed. |
Introduce -maxuploadtarget Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6622 - bitcoin/bitcoin#6987 - bitcoin/bitcoin#6958 - bitcoin/bitcoin#6984 - bitcoin/bitcoin#6999 Part of #2074.
No description provided.