erigon-pulse/polygon/bor/spanner.go
2024-01-09 19:20:42 +01:00

18 lines
738 B
Go

package bor
import (
"github.com/ledgerwatch/erigon/polygon/heimdall/span"
libcommon "github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon/consensus"
"github.com/ledgerwatch/erigon/polygon/bor/valset"
)
//go:generate mockgen -destination=./mock/spanner_mock.go -package=mock . Spanner
type Spanner interface {
GetCurrentSpan(syscall consensus.SystemCall) (*span.Span, error)
GetCurrentValidators(spanId uint64, signer libcommon.Address, chain consensus.ChainHeaderReader) ([]*valset.Validator, error)
GetCurrentProducers(spanId uint64, signer libcommon.Address, chain consensus.ChainHeaderReader) ([]*valset.Validator, error)
CommitSpan(heimdallSpan span.HeimdallSpan, syscall consensus.SystemCall) error
}