Skip to content

Commit

Permalink
network: make GetHeaders best-effort
Browse files Browse the repository at this point in the history
Be a nice neighbor, try to reply with whatever headers we have, don't fail
completely because of a single missing header.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
  • Loading branch information
roman-khimov committed Dec 13, 2024
1 parent 9599fba commit 90b6a42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/network/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ func (s *Server) handleGetHeadersCmd(p Peer, gh *payload.GetBlockByIndex) error
}
header, err := s.chain.GetHeader(hash)
if err != nil {
break
continue
}
resp.Hdrs = append(resp.Hdrs, header)
}
Expand Down

0 comments on commit 90b6a42

Please sign in to comment.