stagedsynctest

package
v1.9.7-0...-acf8c2f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: LGPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BorDevnetChainConfigWithNoBlockSealDelays

func BorDevnetChainConfigWithNoBlockSealDelays() *chain.Config

Types

type Harness

type Harness struct {
	// contains filtered or unexported fields
}

func InitHarness

func InitHarness(ctx context.Context, t *testing.T, cfg HarnessCfg) Harness

func (*Harness) BorConfig

func (h *Harness) BorConfig() *borcfg.BorConfig

func (*Harness) GetStageProgress

func (h *Harness) GetStageProgress(ctx context.Context, t *testing.T, stageID stages.SyncStage) uint64

func (*Harness) Logger

func (h *Harness) Logger() log.Logger

func (*Harness) ReadHeaderByNumber

func (h *Harness) ReadHeaderByNumber(ctx context.Context, number uint64) (header *types.Header, err error)

func (*Harness) ReadLastStateSyncEventNumPerBlockFromDB

func (h *Harness) ReadLastStateSyncEventNumPerBlockFromDB(ctx context.Context) (nums map[uint64]uint64, err error)

func (*Harness) ReadSpansFromDB

func (h *Harness) ReadSpansFromDB(ctx context.Context) (spans []*heimdall.Span, err error)

func (*Harness) ReadStateSyncEventsFromDB

func (h *Harness) ReadStateSyncEventsFromDB(ctx context.Context) (eventIDs []uint64, err error)

func (*Harness) RunMiningStageForward

func (h *Harness) RunMiningStageForward(ctx context.Context, t *testing.T, id stages.SyncStage)

func (*Harness) RunMiningStageForwardWithErrorIs

func (h *Harness) RunMiningStageForwardWithErrorIs(ctx context.Context, t *testing.T, id stages.SyncStage, wantErr error)

func (*Harness) RunMiningStageForwardWithReturnError

func (h *Harness) RunMiningStageForwardWithReturnError(ctx context.Context, t *testing.T, id stages.SyncStage) error

func (*Harness) RunStateStageForwardWithReturnError

func (h *Harness) RunStateStageForwardWithReturnError(t *testing.T, id stages.SyncStage) error

func (*Harness) RunStateSyncStageForward

func (h *Harness) RunStateSyncStageForward(t *testing.T, id stages.SyncStage)

func (*Harness) RunStateSyncStageForwardWithErrorIs

func (h *Harness) RunStateSyncStageForwardWithErrorIs(t *testing.T, id stages.SyncStage, wantErr error)

func (*Harness) SaveHeader

func (h *Harness) SaveHeader(ctx context.Context, t *testing.T, header *types.Header)

func (*Harness) SaveStageProgress

func (h *Harness) SaveStageProgress(ctx context.Context, t *testing.T, stageID stages.SyncStage, progress uint64)

func (*Harness) SetMiningBlockEmptyHeader

func (h *Harness) SetMiningBlockEmptyHeader(ctx context.Context, t *testing.T, parentNum uint64)

func (*Harness) StateSyncUnwindPoint

func (h *Harness) StateSyncUnwindPoint() uint64

func (*Harness) StateSyncUnwindReason

func (h *Harness) StateSyncUnwindReason() stagedsync.UnwindReason

type HarnessCfg

type HarnessCfg struct {
	ChainConfig               *chain.Config
	GenerateChainNumBlocks    int
	LogLvl                    log.Lvl
	HeimdallProducersOverride map[uint64][]valset.Validator
}

func (*HarnessCfg) GetOrCreateDefaultHeimdallProducersOverride

func (hc *HarnessCfg) GetOrCreateDefaultHeimdallProducersOverride() map[uint64][]valset.Validator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL