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

Merged
merged 3 commits into from Nov 14, 2015

Conversation

Projects
None yet
7 participants
@jonasschnelli
Member

jonasschnelli commented Nov 11, 2015

No description provided.

@sipa

View changes

Show outdated Hide outdated src/main.cpp
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 )

This comment has been minimized.

@sipa

sipa Nov 11, 2015

Member

Unnecessary space before )

@sipa

sipa Nov 11, 2015

Member

Unnecessary space before )

This comment has been minimized.

@jonasschnelli

jonasschnelli Nov 11, 2015

Member

True. Force-push removed.

@jonasschnelli

jonasschnelli Nov 11, 2015

Member

True. Force-push removed.

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Nov 11, 2015

Member

utACK

Member

sipa commented Nov 11, 2015

utACK

@gmaxwell

This comment has been minimized.

Show comment
Hide comment
@gmaxwell

gmaxwell Nov 11, 2015

Member

utACK

Member

gmaxwell commented Nov 11, 2015

utACK

@fanquake

This comment has been minimized.

Show comment
Hide comment
@fanquake

fanquake Nov 11, 2015

Member

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

Member

fanquake commented Nov 11, 2015

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

@laanwj laanwj added the P2P label Nov 11, 2015

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Nov 11, 2015

Member

Concept ACK

Member

laanwj commented Nov 11, 2015

Concept ACK

@instagibbs

This comment has been minimized.

Show comment
Hide comment
@instagibbs

instagibbs Nov 12, 2015

Member

utACK

Member

instagibbs commented Nov 12, 2015

utACK

@sipa

View changes

Show outdated Hide outdated qa/rpc-tests/maxuploadtarget.py
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

This comment has been minimized.

@sipa

sipa Nov 12, 2015

Member

nit: enough

@sipa

sipa Nov 12, 2015

Member

nit: enough

This comment has been minimized.

@jonasschnelli

jonasschnelli Nov 12, 2015

Member

Thanks. Fixed.

@jonasschnelli

jonasschnelli Nov 12, 2015

Member

Thanks. Fixed.

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Nov 12, 2015

Member

utACK

Member

sipa commented Nov 12, 2015

utACK

@@ -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

This comment has been minimized.

@MarcoFalke

MarcoFalke Nov 13, 2015

Member

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

@MarcoFalke

MarcoFalke Nov 13, 2015

Member

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

This comment has been minimized.

@gmaxwell

gmaxwell Nov 13, 2015

Member

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.

@gmaxwell

gmaxwell Nov 13, 2015

Member

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.

@gmaxwell

This comment has been minimized.

Show comment
Hide comment
@gmaxwell

gmaxwell Nov 13, 2015

Member

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

Member

gmaxwell commented Nov 13, 2015

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

jonasschnelli added some commits Nov 11, 2015

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Nov 13, 2015

Member

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.

Member

jonasschnelli commented Nov 13, 2015

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.

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Nov 14, 2015

Member

Thanks. Fixed.

Member

jonasschnelli commented Nov 14, 2015

Thanks. Fixed.

@gmaxwell gmaxwell merged commit e495ed5 into bitcoin:master Nov 14, 2015

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

gmaxwell added a commit that referenced this pull request Nov 14, 2015

Merge pull request #6984
e495ed5 add documentation for exluding whitelistes peer from maxuploadtarget (Jonas Schnelli)
5760749 [docs] rename reducetraffic.md to reduce-traffic.md (Jonas Schnelli)
d61fcff don't enforce maxuploadtargets disconnect for whitelisted peers (Jonas Schnelli)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment