mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 11:41:19 +00:00
64072ce6c7
Co-authored-by: battlmonstr <battlmonstr@users.noreply.github.com>
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)
|
|
}
|