testpartition

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: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockchainContains added in v0.1.1

func BlockchainContains(part *NodePartition, criteria func(tx *types.TransactionOrder) bool) func() bool

func BlockchainContainsTx

func BlockchainContainsTx(part *NodePartition, tx *types.TransactionOrder) func() bool

BlockchainContainsTx checks if at least one partition node block contains the given transaction.

Types

type AlphabillNetwork added in v0.2.0

type AlphabillNetwork struct {
	NodePartitions map[p.SystemIdentifier]*NodePartition
	RootPartition  *RootPartition
	// contains filtered or unexported fields
}

AlphabillNetwork for integration tests

func NewAlphabillPartition added in v0.2.0

func NewAlphabillPartition(nodePartitions []*NodePartition) (*AlphabillNetwork, error)

func (*AlphabillNetwork) Close added in v0.2.0

func (a *AlphabillNetwork) Close() error

func (*AlphabillNetwork) GetNodePartition added in v0.2.0

func (a *AlphabillNetwork) GetNodePartition(sysID []byte) (*NodePartition, error)

func (*AlphabillNetwork) Start added in v0.2.0

func (a *AlphabillNetwork) Start(t *testing.T) error

type NodePartition added in v0.2.0

type NodePartition struct {
	Nodes []*partitionNode
	// contains filtered or unexported fields
}

func NewPartition added in v0.2.0

func NewPartition(t *testing.T, nodeCount int, txSystemProvider func(trustBase map[string]crypto.Verifier) txsystem.TransactionSystem, systemIdentifier []byte) (abPartition *NodePartition, err error)

func (*NodePartition) BroadcastTx added in v0.2.0

func (n *NodePartition) BroadcastTx(tx *types.TransactionOrder) error

BroadcastTx sends transactions to all nodes.

func (*NodePartition) GetTxProof added in v0.2.0

func (*NodePartition) ResumeNode added in v0.2.0

func (n *NodePartition) ResumeNode(nodeIdx int) error

func (*NodePartition) StopNode added in v0.2.0

func (n *NodePartition) StopNode(nodeIdx int) error

func (*NodePartition) SubmitTx added in v0.2.0

func (n *NodePartition) SubmitTx(tx *types.TransactionOrder) error

SubmitTx sends transactions to the first node.

type RootPartition added in v0.2.0

type RootPartition struct {
	TrustBase map[string]crypto.Verifier
	Nodes     []*rootNode
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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