mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-05 10:32:19 +00:00
1a6b83b82c
1. Adds an eth/stagedsync/test package which provides a test Harness object 2. Adds the first automated test to the bor-heimdall stage regarding span persistence (more to come in subsequent PRs) 3. Fixes a bug in the bor-heimdall stage which was uncovered with the test - we do not fetch span 0 when we sync straight from blockNum=0 without snapshots 4. Reorganises all mocks to be placed under ./mock sub-package within their respective packages
17 lines
745 B
Go
17 lines
745 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=./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
|
|
}
|