ibc_testing

package
v2.0.0-lsm-rc0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FirstConsumerChainID = ibctesting.GetChainID(2)
)

Functions

func AddDemocracyConsumer

func AddDemocracyConsumer[T testutil.DemocConsumerApp](t *testing.T, coordinator *ibctesting.Coordinator,
	appIniter ibctesting.AppIniter,
) (*ibctesting.TestChain, T)

AddDemocracyConsumer adds a new democ consumer chain to the coordinator and returns the test chain and app type

func AddProvider

func AddProvider[T testutil.ProviderApp](t *testing.T, coordinator *ibctesting.Coordinator, appIniter ibctesting.AppIniter) (
	*ibctesting.TestChain, T,
)

AddProvider adds a new provider chain to the coordinator and returns the test chain and app type

func ConsumerAppIniter

func ConsumerAppIniter() (ibctesting.TestingApp, map[string]json.RawMessage)

ConsumerAppIniter implements ibctesting.AppIniter for a consumer app

func DemocracyConsumerAppIniter

func DemocracyConsumerAppIniter() (ibctesting.TestingApp, map[string]json.RawMessage)

DemocracyConsumerAppIniter implements ibctesting.AppIniter for a democracy consumer app

func ProviderAppIniter

func ProviderAppIniter() (ibctesting.TestingApp, map[string]json.RawMessage)

ProviderAppIniter implements ibctesting.AppIniter for a provider app

Types

type ConsumerBundle

type ConsumerBundle struct {
	Chain        *ibctesting.TestChain
	App          testutil.ConsumerApp
	Path         *ibctesting.Path
	TransferPath *ibctesting.Path
}

ConsumerBundle serves as a way to store useful in-mem consumer app chain state and relevant IBC paths in the context of CCV integration testing.

func AddConsumer

func AddConsumer[Tp testutil.ProviderApp, Tc testutil.ConsumerApp](
	coordinator *ibctesting.Coordinator,
	s *suite.Suite,
	index int,
	appIniter ibctesting.AppIniter,
) *ConsumerBundle

AddConsumer adds a new consumer chain with "testchain<index+2>" as chainID to the coordinator and returns the test chain and app type. A new client is created on the provider to the new consumer chain (see CreateConsumerClient). The new consumer is initialized with the InitialValSet from the genesis state generated by the provider (see MakeConsumerGenesis).

This method must be called after AddProvider.

func (ConsumerBundle) GetCtx

func (cb ConsumerBundle) GetCtx() sdk.Context

GetCtx returns the context for the ConsumerBundle

func (ConsumerBundle) GetKeeper

func (cb ConsumerBundle) GetKeeper() consumerkeeper.Keeper

GetKeeper returns the keeper for the ConsumerBundle

Jump to

Keyboard shortcuts

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