Only MAX_BLOCK_HEADERS - 1 (511) headers sent during sync, instead of MAX_BLOCK_HEADERS (512) (#2116)

This commit is contained in:
David Burkett 2018-12-10 13:35:07 -05:00 committed by Ignotus Peverell
parent 0ce8f3e1cd
commit 62d644e1f4

View file

@ -267,7 +267,7 @@ impl p2p::ChainAdapter for NetToChainAdapter {
// looks like we know one, getting as many following headers as allowed
let hh = header.height;
let mut headers = vec![];
for h in (hh + 1)..(hh + (p2p::MAX_BLOCK_HEADERS as u64)) {
for h in (hh + 1)..=(hh + (p2p::MAX_BLOCK_HEADERS as u64)) {
if h > max_height {
break;
}