mockednetwork

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: Apache-2.0, BSD-2-Clause Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Testing  *testing.T
	Name     string
	BaseDir  *utils.Directory
	KeyPair  ed25519.KeyPair
	Endpoint *network.MockedEndpoint
	Workers  *workerpool.Group
	Protocol *protocol.Protocol
	// contains filtered or unexported fields
}

func NewNode

func NewNode(t *testing.T, keyPair ed25519.KeyPair, network *network.MockedNetwork, partition string, snapshotPath string, ledgerProvider module.Provider[*engine.Engine, ledger.Ledger]) *Node

func NewNodeFromDisk

func NewNodeFromDisk(t *testing.T, keyPair ed25519.KeyPair, network *network.MockedNetwork, partition string, baseDir string) *Node

func (*Node) AssertEqualChainsAtLeastAtSlot

func (n *Node) AssertEqualChainsAtLeastAtSlot(index slot.Index, other *Node)

func (*Node) EngineTestFramework

func (n *Node) EngineTestFramework() *engine.TestFramework

func (*Node) HookLogging

func (n *Node) HookLogging(includeMainEngine bool)

func (*Node) IssueActivity

func (n *Node) IssueActivity(duration time.Duration, wg *sync.WaitGroup)

func (*Node) IssueBlock

func (n *Node) IssueBlock(alias string, parents ...models.BlockID) *models.Block

func (*Node) IssueBlockAtSlot

func (n *Node) IssueBlockAtSlot(alias string, slotIndex slot.Index, parents ...models.BlockID) *models.Block

func (*Node) ValidateAcceptedBlocks

func (n *Node) ValidateAcceptedBlocks(expectedAcceptedBlocks map[models.BlockID]bool)

func (*Node) Wait

func (n *Node) Wait()

Jump to

Keyboard shortcuts

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