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