lcdtest

package
v0.0.0-...-410e5a8 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAddr

func CreateAddr(name string, kb keyring.Keybase) (sdk.AccAddress, string, error)

CreateAddr adds an address to the key store and returns an address and seed. It also requires that the key could be created.

func CreateAddrs

func CreateAddrs(kb keyring.Keybase, numAddrs int) (addrs []sdk.AccAddress, seeds, names []string, errs []error)

CreateAddrs adds multiple address to the key store and returns the addresses and associated seeds in lexographical order by address. It also requires that the keys could be created.

func GetConfig

func GetConfig() (*tmcfg.Config, error)

GetConfig returns a Tendermint config for the test cases.

func InitClientHome

func InitClientHome(dir string) string

InitClientHome initialises client home dir.

func InitializeLCD

func InitializeLCD(
	nValidators int, initAddrs []sdk.AccAddress, minting bool, portExt ...string,
) (cleanup func(), valConsPubKeys []crypto.PubKey, valOperAddrs []sdk.ValAddress, port string, err error)

InitializeLCD starts Tendermint and the LCD in process, listening on their respective sockets where nValidators is the total number of validators and initAddrs are the accounts to initialize with some stake tokens. It returns a cleanup function, a set of validator public keys, and a port.

Types

type AddrSeed

type AddrSeed struct {
	Address sdk.AccAddress
	Seed    string
	Name    string
}

AddrSeed combines an Address with the mnemonic of the private key to that address

type AddrSeedSlice

type AddrSeedSlice []AddrSeed

AddrSeedSlice implements `Interface` in sort package.

func (AddrSeedSlice) Len

func (b AddrSeedSlice) Len() int

func (AddrSeedSlice) Less

func (b AddrSeedSlice) Less(i, j int) bool

Less sorts lexicographically by Address

func (AddrSeedSlice) Swap

func (b AddrSeedSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

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