testpartition

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: AGPL-3.0, ISC Imports: 18 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(network *AlphabillPartition, criteria func(tx *txsystem.Transaction) bool) func() bool

func BlockchainContainsTx

func BlockchainContainsTx(tx *txsystem.Transaction, network *AlphabillPartition) func() bool

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

Types

type AlphabillPartition

type AlphabillPartition struct {
	RootChain *rootchain.RootChain
	Nodes     []*partition.Node

	TrustBase    map[string]crypto.Verifier
	EventHandler *testevent.TestEventHandler
	// contains filtered or unexported fields
}

AlphabillPartition for integration tests

func NewNetwork

func NewNetwork(partitionNodes int, txSystemProvider func(trustBase map[string]crypto.Verifier) txsystem.TransactionSystem, systemIdentifier []byte) (*AlphabillPartition, error)

NewNetwork creates the AlphabillPartition for integration tests. It starts partition nodes with given transaction system and a root chain.

func (*AlphabillPartition) BroadcastTx

func (a *AlphabillPartition) BroadcastTx(tx *txsystem.Transaction) error

BroadcastTx sends transactions to all nodes.

func (*AlphabillPartition) Close

func (a *AlphabillPartition) Close() error

func (*AlphabillPartition) GetBlockProof added in v0.1.1

func (a *AlphabillPartition) GetBlockProof(tx *txsystem.Transaction, txConverter TxConverter) (*block.GenericBlock, *block.BlockProof, error)

func (*AlphabillPartition) SubmitTx

func (a *AlphabillPartition) SubmitTx(tx *txsystem.Transaction) error

SubmitTx sends transactions to the first node.

type TxConverter added in v0.1.1

type TxConverter func(tx *txsystem.Transaction) (txsystem.GenericTransaction, error)

func (TxConverter) ConvertTx added in v0.1.1

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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