mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
ad5974da96
Fixes issues with consensus validation. Compare against current producer set instead of whole validator set.
17 lines
810 B
Go
17 lines
810 B
Go
package bor
|
|
|
|
import (
|
|
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
|
"github.com/ledgerwatch/erigon/consensus"
|
|
"github.com/ledgerwatch/erigon/consensus/bor/heimdall/span"
|
|
"github.com/ledgerwatch/erigon/consensus/bor/valset"
|
|
)
|
|
|
|
//go:generate mockgen -destination=./span_mock.go -package=bor . Spanner
|
|
type Spanner interface {
|
|
GetCurrentSpan(syscall consensus.SystemCall) (*span.Span, error)
|
|
GetCurrentValidators(blockNumber uint64, signer libcommon.Address, getSpanForBlock func(blockNum uint64) (*span.HeimdallSpan, error)) ([]*valset.Validator, error)
|
|
GetCurrentProducers(blockNumber uint64, signer libcommon.Address, getSpanForBlock func(blockNum uint64) (*span.HeimdallSpan, error)) ([]*valset.Validator, error)
|
|
CommitSpan(heimdallSpan span.HeimdallSpan, syscall consensus.SystemCall) error
|
|
}
|