forked from TrueCloudLab/neoneo-go
network: adjust requestBlocs logic
If the lastQueued block index is the same as the one we'd like to request in payload, then we need to increment the payload's count.
This commit is contained in:
parent
be9a231c98
commit
c0a453a53b
1 changed files with 1 additions and 1 deletions
|
@ -1250,7 +1250,7 @@ func (s *Server) requestBlocks(bq Blockqueuer, p Peer) error {
|
|||
h := bq.BlockHeight()
|
||||
pl := getRequestBlocksPayload(p, h, &s.lastRequestedBlock)
|
||||
lq := s.bQueue.lastQueued()
|
||||
if lq > pl.IndexStart {
|
||||
if lq >= pl.IndexStart {
|
||||
c := int16(h + blockCacheSize - lq)
|
||||
if c < payload.MaxHashesCount {
|
||||
pl.Count = c
|
||||
|
|
Loading…
Reference in a new issue