mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 23:33:37 +00:00
network: fix GetBlocks command
Return exactly requested amount of hashes.
This commit is contained in:
parent
8ed1d4dfba
commit
074ba5f394
1 changed files with 1 additions and 1 deletions
|
@ -595,7 +595,7 @@ func (s *Server) handleGetBlocksCmd(p Peer, gb *payload.GetBlocks) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
blockHashes := make([]util.Uint256, 0)
|
blockHashes := make([]util.Uint256, 0)
|
||||||
for i := start.Index + 1; i < start.Index+uint32(count); i++ {
|
for i := start.Index + 1; i <= start.Index+uint32(count); i++ {
|
||||||
hash := s.chain.GetHeaderHash(int(i))
|
hash := s.chain.GetHeaderHash(int(i))
|
||||||
if hash.Equals(util.Uint256{}) {
|
if hash.Equals(util.Uint256{}) {
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue