beacon/light/sync: check error (#34818)

This commit is contained in:
cui 2026-05-19 18:21:43 +08:00 committed by GitHub
parent 1149f76dca
commit 4f4bfdbea7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,7 +98,10 @@ func (s *CheckpointInit) Process(requester request.Requester, events []request.E
case ssDefault: case ssDefault:
if resp != nil { if resp != nil {
if checkpoint := resp.(*types.BootstrapData); checkpoint.Header.Hash() == common.Hash(req.(ReqCheckpointData)) { if checkpoint := resp.(*types.BootstrapData); checkpoint.Header.Hash() == common.Hash(req.(ReqCheckpointData)) {
s.chain.CheckpointInit(*checkpoint) err := s.chain.CheckpointInit(*checkpoint)
if err != nil {
return
}
s.initialized = true s.initialized = true
return return
} }