diff options
| author | Matt Corallo <[email protected]> | 2012-03-19 00:13:15 -0400 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2012-03-19 00:13:15 -0400 |
| commit | ecf07f2729ebc0a8af969de9c8e936b72dd3fde8 (patch) | |
| tree | 3ba5c90d7d295c39b9854529e5cf8fd927d1f6cc /src/util.cpp | |
| parent | Merge pull request #931 from luke-jr/dbg_loaderr (diff) | |
| download | discoin-ecf07f2729ebc0a8af969de9c8e936b72dd3fde8.tar.xz discoin-ecf07f2729ebc0a8af969de9c8e936b72dd3fde8.zip | |
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
Diffstat (limited to 'src/util.cpp')
0 files changed, 0 insertions, 0 deletions