mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 11:41:19 +00:00
17 lines
391 B
Go
17 lines
391 B
Go
package sync
|
|
|
|
import (
|
|
"context"
|
|
"math/big"
|
|
|
|
"github.com/ledgerwatch/erigon/core/types"
|
|
)
|
|
|
|
//go:generate mockgen -destination=./sentry_mock.go -package=sync . Sentry
|
|
type Sentry interface {
|
|
MaxPeers() int
|
|
PeersWithBlockNumInfo() PeersWithBlockNumInfo
|
|
DownloadHeaders(ctx context.Context, start *big.Int, end *big.Int, peerID string) ([]*types.Header, error)
|
|
Penalize(peerID string)
|
|
}
|