util

package
v0.29.6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockBlockTimer

func MockBlockTimer() protocol.BlockTimer

MockBlockTimer returns BlockTimer that accepts all timestamps without performing any checks.

func MockReceiptValidator

func MockReceiptValidator() module.ReceiptValidator

MockReceiptValidator returns a ReceiptValidator that accepts all receipts without performing any integrity checks.

func MockSealValidator

func MockSealValidator(sealsDB storage.Seals) module.SealValidator

MockSealValidator returns a SealValidator that accepts all seals without performing any integrity checks, returns first seal in block as valid one

func RunWithBootstrapState

func RunWithBootstrapState(t testing.TB, rootSnapshot protocol.Snapshot, f func(*badger.DB, *pbadger.State))

func RunWithFollowerProtocolState

func RunWithFollowerProtocolState(t testing.TB, rootSnapshot protocol.Snapshot, f func(*badger.DB, *pbadger.FollowerState))

func RunWithFollowerProtocolStateAndHeaders

func RunWithFollowerProtocolStateAndHeaders(t testing.TB, rootSnapshot protocol.Snapshot, f func(*badger.DB, *pbadger.FollowerState, storage.Headers, storage.Index))

func RunWithFullProtocolState

func RunWithFullProtocolState(t testing.TB, rootSnapshot protocol.Snapshot, f func(*badger.DB, *pbadger.MutableState))

func RunWithFullProtocolStateAndConsumer

func RunWithFullProtocolStateAndConsumer(t testing.TB, rootSnapshot protocol.Snapshot, consumer protocol.Consumer, f func(*badger.DB, *pbadger.MutableState))

func RunWithFullProtocolStateAndMetrics

func RunWithFullProtocolStateAndMetrics(t testing.TB, rootSnapshot protocol.Snapshot, metrics module.ComplianceMetrics, f func(*badger.DB, *pbadger.MutableState))

func RunWithFullProtocolStateAndValidator

func RunWithFullProtocolStateAndValidator(t testing.TB, rootSnapshot protocol.Snapshot, validator module.ReceiptValidator, f func(*badger.DB, *pbadger.MutableState))

Types

This section is empty.

Jump to

Keyboard shortcuts

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