HomePhabricator

Limit getheaders to a hard 2000.
ecf07f2729ebUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Limit getheaders to a hard 2000.

Previously getheaders would return any number of headers up to
2000 + the distance the locator parameter was back (which is up to
~ the number of items in the locator ^ 2).

The only client I was able to find which actually handles the headers
message is BitcoinJ, and it clearly expects no more than 2000 headers
See:
http://code.google.com/p/bitcoinj/source/browse/core/src/main/java/com/google/bitcoin/core/HeadersMessage.java#35

Additionally, the wiki clearly states that getheaders will only ever
return 2000 headers: https://en.bitcoin.it/wiki/Network#Messages

Details

Provenance
Matt Corallo <matt@bluematt.me>Authored on Mar 19 2012, 04:13
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGING0b99d1b574f3: Merge pull request #931 from luke-jr/dbg_loaderr
Branches
Unknown
Tags
Unknown

Event Timeline

Matt Corallo <matt@bluematt.me> committed rSTAGINGecf07f2729eb: Limit getheaders to a hard 2000. (authored by Matt Corallo <matt@bluematt.me>).Mar 19 2012, 04:13