Documentation
¶
Index ¶
- type Components
- type Swamp
- func (s *Swamp) NewBridgeNode(options ...node.Option) *node.Node
- func (s *Swamp) NewBridgeNodeWithStore(store node.Store, options ...node.Option) *node.Node
- func (s *Swamp) NewLightNode(options ...node.Option) *node.Node
- func (s *Swamp) NewLightNodeWithStore(store node.Store, options ...node.Option) *node.Node
- func (s *Swamp) WaitTillHeight(ctx context.Context, height int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Components ¶
type Components struct { App types.Application CoreCfg *tn.Config }
Components struct represents a set of pre-requisite attributes from the test scenario
func DefaultComponents ¶
func DefaultComponents() *Components
DefaultComponents creates a KvStore with a block retention of 200 In addition, the empty block interval is set to 200ms
type Swamp ¶
type Swamp struct { Network mocknet.Mocknet CoreClient core.Client BridgeNodes []*node.Node LightNodes []*node.Node // contains filtered or unexported fields }
Swamp represents the main functionality that is needed for the test-case: - Network to link the nodes - CoreClient to share between Bridge nodes - Slices of created Bridge/Light Nodes - trustedHash taken from the CoreClient and shared between nodes
func NewSwamp ¶
func NewSwamp(t *testing.T, ic *Components) *Swamp
NewSwamp creates a new instance of Swamp.
func (*Swamp) NewBridgeNode ¶
NewBridgeNode creates a new instance of a BridgeNode providing a default config and a mockstore to the NewBridgeNodeWithStore method
func (*Swamp) NewBridgeNodeWithStore ¶
NewBridgeNodeWithStore creates a new instance of BridgeNodes with predefined Store. Afterwards, the instance is stored in the swamp's BridgeNodes slice.
func (*Swamp) NewLightNode ¶
NewLightNode creates a new instance of a LightNode providing a default config and a mockstore to the NewLightNodeWithStore method
func (*Swamp) NewLightNodeWithStore ¶
NewLightNodeWithStore creates a new instance of LightNode with predefined Store. Afterwards, the instance is stored in the swamp's LightNodes slice