mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-15 00:13:46 +00:00
fmt
This commit is contained in:
parent
89fadee71e
commit
01117acbcc
1 changed files with 2 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
// Checkpoint whitelist
|
// Checkpoint whitelist
|
||||||
type Service struct {
|
type Service struct {
|
||||||
m sync.RWMutex
|
m sync.Mutex
|
||||||
checkpointWhitelist map[uint64]common.Hash // Checkpoint whitelist, populated by reaching out to heimdall
|
checkpointWhitelist map[uint64]common.Hash // Checkpoint whitelist, populated by reaching out to heimdall
|
||||||
checkpointOrder []uint64 // Checkpoint order, populated by reaching out to heimdall
|
checkpointOrder []uint64 // Checkpoint order, populated by reaching out to heimdall
|
||||||
maxCapacity uint
|
maxCapacity uint
|
||||||
|
|
@ -54,6 +54,7 @@ func (w *Service) IsValidChain(remoteHeader *types.Header, fetchHeadersByNumber
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, fmt.Errorf("%w: last checkpoint %d, err %v", ErrNoRemoteCheckoint, lastCheckpointBlockNum, err)
|
return false, fmt.Errorf("%w: last checkpoint %d, err %v", ErrNoRemoteCheckoint, lastCheckpointBlockNum, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(headers) == 0 {
|
if len(headers) == 0 {
|
||||||
return true, fmt.Errorf("%w: last checkpoint %d", ErrNoRemoteCheckoint, lastCheckpointBlockNum)
|
return true, fmt.Errorf("%w: last checkpoint %d", ErrNoRemoteCheckoint, lastCheckpointBlockNum)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue