unittest

package
v0.26.12 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecutionDataFixture

func ExecutionDataFixture(blockID flow.Identifier) *state_synchronization.ExecutionData

func MockBlockHeaderStorage

func MockBlockHeaderStorage(opts ...BlockHeaderMockOptions) *storagemock.Headers

func MockProtocolState

func MockProtocolState(opts ...StateMockOptions) *statemock.State

func MockProtocolStateSnapshot

func MockProtocolStateSnapshot(opts ...SnapshotMockOptions) *statemock.Snapshot

func MockResultsStorage

func MockResultsStorage(opts ...ResultsMockOptions) *storagemock.ExecutionResults

func MockSealsStorage added in v0.26.8

func MockSealsStorage(opts ...SealsMockOptions) *storagemock.Seals

func RemoveExpectedCall

func RemoveExpectedCall(method string, expectedCalls []*mock.Call) []*mock.Call

func WithCollections

func WithCollections(collections []*flow.Collection) func(*state_synchronization.ExecutionData)

func WithEvents

func WithEvents(events []flow.EventsList) func(*state_synchronization.ExecutionData)

func WithTrieUpdates

func WithTrieUpdates(updates []*ledger.TrieUpdate) func(*state_synchronization.ExecutionData)

Types

type BlockHeaderMockOptions

type BlockHeaderMockOptions func(*storagemock.Headers)

func WithByHeight

func WithByHeight(blocksByHeight map[uint64]*flow.Block) BlockHeaderMockOptions

func WithByID

func WithByID(blocksByID map[flow.Identifier]*flow.Block) BlockHeaderMockOptions

type ResultsMockOptions

type ResultsMockOptions func(*storagemock.ExecutionResults)

func WithByBlockID

func WithByBlockID(resultsByID map[flow.Identifier]*flow.ExecutionResult) ResultsMockOptions

func WithResultByID added in v0.26.8

func WithResultByID(resultsByID map[flow.Identifier]*flow.ExecutionResult) ResultsMockOptions

type SealsMockOptions added in v0.26.8

type SealsMockOptions func(*storagemock.Seals)

func WithSealsByBlockID added in v0.26.8

func WithSealsByBlockID(sealsByBlockID map[flow.Identifier]*flow.Seal) SealsMockOptions

type SnapshotMockOptions

type SnapshotMockOptions func(*statemock.Snapshot)

func WithHead

func WithHead(head *flow.Header) SnapshotMockOptions

func WithSeal added in v0.26.8

func WithSeal(seal *flow.Seal) SnapshotMockOptions

type StateMockOptions

type StateMockOptions func(*statemock.State)

func WithSealedSnapshot added in v0.26.8

func WithSealedSnapshot(snapshot *statemock.Snapshot) StateMockOptions

Jump to

Keyboard shortcuts

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