mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
eth/protocols/eth: handle Count Zero
This commit is contained in:
parent
c35684709c
commit
08bb58b482
1 changed files with 3 additions and 0 deletions
|
|
@ -144,6 +144,9 @@ func serviceContiguousBlockHeaderQuery(chain *core.BlockChain, query *GetBlockHe
|
||||||
if count > maxHeadersServe {
|
if count > maxHeadersServe {
|
||||||
count = maxHeadersServe
|
count = maxHeadersServe
|
||||||
}
|
}
|
||||||
|
if count == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
if query.Origin.Hash == (common.Hash{}) {
|
if query.Origin.Hash == (common.Hash{}) {
|
||||||
// Number mode, just return the canon chain segment. The backend
|
// Number mode, just return the canon chain segment. The backend
|
||||||
// delivers in [N, N-1, N-2..] descending order, so we need to
|
// delivers in [N, N-1, N-2..] descending order, so we need to
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue