lcdtest

package
v0.0.0-...-4a8347a Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAddr

func CreateAddr(name, password string, kb crkeys.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 crkeys.Keybase, numAddrs int) (addrs []sdk.AccAddress, seeds, names, passwords []string, errs []error)

CreateAddr 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)

TODO: Make InitializeTestLCD safe to call in multiple tests at the same time 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
	Password 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