testutils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBlockCertificationRequest

func CreateBlockCertificationRequest(t *testing.T, ir *types.InputRecord, sysID []byte, node *TestNode) *certification.BlockCertificationRequest

func MockAwaitMessage

func MockAwaitMessage[T any](t *testing.T, net *testnetwork.MockNet, msgType string) T

func MockNetAwaitMultiple

func MockNetAwaitMultiple[T any](t *testing.T, net *testnetwork.MockNet, msgType string, nof int) []T

func MockValidatorNetReceives

func MockValidatorNetReceives(t *testing.T, net *testnetwork.MockNet, id peer.ID, msgType string, msg any)

Types

type TestNode

type TestNode struct {
	Signer   crypto.Signer
	Verifier crypto.Verifier
	Peer     *network.Peer
}

func CreatePartitionNodesAndPartitionRecord

func CreatePartitionNodesAndPartitionRecord(t *testing.T, ir *types.InputRecord, systemID []byte, nrOfValidators int) (partitionNodes []*TestNode, record *genesis.PartitionRecord)

func NewTestNode

func NewTestNode(t *testing.T) *TestNode

Jump to

Keyboard shortcuts

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