fix: return value for no remote block

This commit is contained in:
Manav Darji 2022-05-24 14:32:44 +05:30
parent 01117acbcc
commit 2b089ee6d3

View file

@ -56,7 +56,7 @@ func (w *Service) IsValidChain(remoteHeader *types.Header, fetchHeadersByNumber
}
if len(headers) == 0 {
return true, fmt.Errorf("%w: last checkpoint %d", ErrNoRemoteCheckoint, lastCheckpointBlockNum)
return false, fmt.Errorf("%w: last checkpoint %d", ErrNoRemoteCheckoint, lastCheckpointBlockNum)
}
reqBlockNum := headers[0].Number.Uint64()