mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-30 16:43:46 +00:00
* eth, consensus: refactor whitelisting related logs and error handling * core: fix lint * eth: fix tests, check against root error * eth: use ctx correctly while logging * eth: refactor comments and error message
24 lines
1.3 KiB
Go
24 lines
1.3 KiB
Go
package bor
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/ethereum/go-ethereum/consensus/bor/clerk"
|
|
"github.com/ethereum/go-ethereum/consensus/bor/heimdall/checkpoint"
|
|
"github.com/ethereum/go-ethereum/consensus/bor/heimdall/milestone"
|
|
"github.com/ethereum/go-ethereum/consensus/bor/heimdall/span"
|
|
)
|
|
|
|
//go:generate mockgen -destination=../../tests/bor/mocks/IHeimdallClient.go -package=mocks . IHeimdallClient
|
|
type IHeimdallClient interface {
|
|
StateSyncEvents(ctx context.Context, fromID uint64, to int64) ([]*clerk.EventRecordWithTime, error)
|
|
Span(ctx context.Context, spanID uint64) (*span.HeimdallSpan, error)
|
|
FetchCheckpoint(ctx context.Context, number int64) (*checkpoint.Checkpoint, error)
|
|
FetchCheckpointCount(ctx context.Context) (int64, error)
|
|
FetchMilestone(ctx context.Context) (*milestone.Milestone, error)
|
|
FetchMilestoneCount(ctx context.Context) (int64, error)
|
|
FetchNoAckMilestone(ctx context.Context, milestoneID string) error // Fetch the bool value whether milestone corresponding to the given id failed in the Heimdall
|
|
FetchLastNoAckMilestone(ctx context.Context) (string, error) // Fetch latest failed milestone id
|
|
FetchMilestoneID(ctx context.Context, milestoneID string) error // Fetch the bool value whether milestone corresponding to the given id is in process in Heimdall
|
|
Close()
|
|
}
|