testutils

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: AGPL-3.0 Imports: 14 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, partitionID types.PartitionID, 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)

func RandomNodeID added in v1.0.0

func RandomNodeID(t *testing.T) (string, []byte)

RandomNodeID returns base58 node id and the corresponding auth public key

Types

type TestNode

type TestNode struct {
	Signer   crypto.Signer
	Verifier crypto.Verifier
	PeerConf *network.PeerConfiguration
}

func CreatePartitionNodesAndPartitionRecord

func CreatePartitionNodesAndPartitionRecord(t *testing.T, ir *types.InputRecord, partitionID types.PartitionID, 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