ibc_testing

package
v4.1.0-lsm Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 23 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FirstConsumerChainID string
)

Functions

func AddDemocracyConsumer

func AddDemocracyConsumer[T testutil.DemocConsumerApp](
	coordinator *ibctesting.Coordinator,
	s *suite.Suite,
	appIniter ValSetAppIniter,
) (*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 AppIniter) (
	*ibctesting.TestChain, T,
)

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

func ProviderAppIniter

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

ProviderAppIniter implements ibctesting.AppIniter for a provider app

Types

type AppIniter

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

func ConsumerAppIniter

func ConsumerAppIniter(initValPowers []types.ValidatorUpdate) AppIniter

ConsumerAppIniter returns a ibctesting.ValSetAppIniter for a consumer app

func DemocracyConsumerAppIniter

func DemocracyConsumerAppIniter(initValPowers []types.ValidatorUpdate) AppIniter

DemocracyConsumerAppIniter implements ibctesting.ValSetAppIniter for a democracy consumer app

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 ValSetAppIniter,
) *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

type ValSetAppIniter

type ValSetAppIniter func([]types.ValidatorUpdate) AppIniter

Jump to

Keyboard shortcuts

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