test

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package test provides helper and setup functions to test the substrate package.

Index

Constants

View Source
const PastBlocks = 100

PastBlocks defines how many blocks into the past the event subs should query. Must be large enough to ensure that event subs can query all past events of the current test.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainCfg

type ChainCfg struct {
	// ChainUrl is the url of the chain's RPC endpoint.
	ChainUrl string `json:"chain_url"`
	// Network is the network ID.
	NetworkID substrate.NetworkID `json:"network_id"`
	// BlockTime is the block time of the node in milli seconds.
	BlockTimeMs uint32 `json:"block_time_ms"`
	BlockTime   time.Duration
}

func LoadChainCfg

func LoadChainCfg(t *testing.T) ChainCfg

type Setup

type Setup struct {
	ChainCfg

	API *substrate.API
}

func NewSetup

func NewSetup(t *testing.T) *Setup

Jump to

Keyboard shortcuts

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