Fix SendHeaderRequest peer minBlock (#2946)

This commit is contained in:
TBC Dev 2021-11-11 16:34:13 +08:00 committed by GitHub
parent 3df4197f2e
commit 484c8eed91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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{