network

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig(options *NetworkConfigOptions) network.Config

DefaultConfig will initialize config for the network with custom application, genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig If options are provided as nil, no custom options will be utilized.

func New

func New(t *testing.T, configs ...network.Config) *network.Network

New creates instance with fully configured cosmos network. Accepts optional config, that will be used in place of the DefaultConfig() if provided.

func NewTestNetworkFixture

func NewTestNetworkFixture() network.TestFixture

NewTestNetworkFixture returns a new simapp AppConstructor for network simulation tests

Types

type Config

type Config = network.Config

type Network

type Network = network.Network

type NetworkConfigOptions

type NetworkConfigOptions struct {
	// AppOptions allows for overriding the default AppOptions in the configuration.
	// This is useful for overriding things like command line flags which normally exist in this struct.
	AppOptions servertypes.AppOptions
	// OnNewApp is a function invoked immediately before the test network calls `app.New` to initialize
	// the application. It is called with the in-process validator running the application.
	OnNewApp func(val network.ValidatorI)
}

NetworkConfigOptions represent configuration options that can be passed to the `DefaultConfig` method when creating a test network.

Jump to

Keyboard shortcuts

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