testutils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: Apache-2.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, 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 RandomNodeID

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 CreateTestNodes

func CreateTestNodes(t *testing.T, nrOfValidators int) ([]*TestNode, []*types.NodeInfo)

func NewTestNode

func NewTestNode(t *testing.T) *TestNode

func (*TestNode) KeyConf

func (n *TestNode) KeyConf(t *testing.T) *partition.KeyConf

func (*TestNode) NodeInfo

func (n *TestNode) NodeInfo(t *testing.T) *types.NodeInfo

Jump to

Keyboard shortcuts

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