From 484c8eed91f9e603392c6a560ff8c7a365e8356e Mon Sep 17 00:00:00 2001 From: TBC Dev <48684072+tbcd@users.noreply.github.com> Date: Thu, 11 Nov 2021 16:34:13 +0800 Subject: [PATCH] Fix SendHeaderRequest peer minBlock (#2946) --- cmd/sentry/download/sentry_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/sentry/download/sentry_api.go b/cmd/sentry/download/sentry_api.go index 5f2b26865..05f7663d7 100644 --- a/cmd/sentry/download/sentry_api.go +++ b/cmd/sentry/download/sentry_api.go @@ -106,7 +106,7 @@ func (cs *ControlServerImpl) SendHeaderRequest(ctx context.Context, req *headerd } minBlock := req.Number if !req.Reverse { - minBlock = req.Number + req.Length*req.Skip + minBlock = req.Number + (req.Length-1)*(req.Skip+1) } outreq := proto_sentry.SendMessageByMinBlockRequest{