Documentation ¶
Index ¶
- func BlockchainContains(part *NodePartition, criteria func(tx *types.TransactionOrder) bool) func() bool
- func BlockchainContainsTx(part *NodePartition, tx *types.TransactionOrder) func() bool
- func WaitTxProof(t *testing.T, part *NodePartition, txOrder *types.TransactionOrder) (*types.TransactionRecord, *types.TxProof, error)
- func WaitUnitProof(t *testing.T, part *NodePartition, ID types.UnitID, ...) (*types.UnitDataAndProof, error)
- type AlphabillNetwork
- func (a *AlphabillNetwork) Close() (err error)
- func (a *AlphabillNetwork) GetNodePartition(sysID types.SystemID) (*NodePartition, error)
- func (a *AlphabillNetwork) GetValidator(sysID types.SystemID) (partition.UnicityCertificateValidator, error)
- func (a *AlphabillNetwork) Start(t *testing.T) error
- func (a *AlphabillNetwork) WaitClose(t *testing.T)
- type NodePartition
- type RootPartition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockchainContains ¶
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.
func WaitTxProof ¶
func WaitTxProof(t *testing.T, part *NodePartition, txOrder *types.TransactionOrder) (*types.TransactionRecord, *types.TxProof, error)
WaitTxProof - wait for proof from any validator in partition. If one has the proof it does not mean all have processed the UC. Returns both transaction record and proof when tx has been executed and added to block
func WaitUnitProof ¶
func WaitUnitProof(t *testing.T, part *NodePartition, ID types.UnitID, txOrder *types.TransactionOrder) (*types.UnitDataAndProof, error)
Types ¶
type AlphabillNetwork ¶
type AlphabillNetwork struct { NodePartitions map[types.SystemID]*NodePartition RootPartition *RootPartition // contains filtered or unexported fields }
AlphabillNetwork for integration tests
func NewAlphabillPartition ¶
func NewAlphabillPartition(nodePartitions []*NodePartition) (*AlphabillNetwork, error)
func NewMultiRootAlphabillPartition ¶
func NewMultiRootAlphabillPartition(nofRootNodes uint8, nodePartitions []*NodePartition) (*AlphabillNetwork, error)
func (*AlphabillNetwork) Close ¶
func (a *AlphabillNetwork) Close() (err error)
func (*AlphabillNetwork) GetNodePartition ¶
func (a *AlphabillNetwork) GetNodePartition(sysID types.SystemID) (*NodePartition, error)
func (*AlphabillNetwork) GetValidator ¶
func (a *AlphabillNetwork) GetValidator(sysID types.SystemID) (partition.UnicityCertificateValidator, error)
func (*AlphabillNetwork) WaitClose ¶
func (a *AlphabillNetwork) WaitClose(t *testing.T)
WaitClose closes the AB network and waits for all the nodes to stop. It fails the test "t" if nodes do not stop/exit within timeout.
type NodePartition ¶
type NodePartition struct { Nodes []*partitionNode // contains filtered or unexported fields }
func NewPartition ¶
func (*NodePartition) BroadcastTx ¶
func (n *NodePartition) BroadcastTx(tx *types.TransactionOrder) error
BroadcastTx sends transactions to all nodes.
func (*NodePartition) GetTxProof ¶
func (n *NodePartition) GetTxProof(tx *types.TransactionOrder) (*types.Block, *types.TxProof, *types.TransactionRecord, error)
func (*NodePartition) SubmitTx ¶
func (n *NodePartition) SubmitTx(tx *types.TransactionOrder) error
SubmitTx sends transactions to the first node.
type RootPartition ¶
Click to show internal directories.
Click to hide internal directories.