ibc_testing

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0 Imports: 19 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func AddDemocracyConsumer

func AddDemocracyConsumer[T e2eutil.DemocConsumerApp](coordinator *ibctesting.Coordinator, t *testing.T,
	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 e2eutil.ProviderApp](coordinator *ibctesting.Coordinator, t *testing.T, 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          e2eutil.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 e2e testing.

func AddConsumer

func AddConsumer[Tp e2eutil.ProviderApp, Tc e2eutil.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