testsuite

package
v1.10.19 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBlockWithTxs

func CreateBlockWithTxs(tx types.ResponseDeliverTx, txData []byte, count int) (types.BlockData, time.Time)

func CreateTestBlock

func CreateTestBlock(tx types.ResponseDeliverTx, count int) (types.BlockData, time.Time)

func EmptyBlock

func EmptyBlock() (types.BlockData, time.Time)

func MustHexDecode

func MustHexDecode(s string) []byte

MustHexDecode - returns decoded hex string, if it can't decode throws panic

data := MustHexDecode("deadbeaf")

func Ptr

func Ptr[T any](t T) *T

Ptr - returns pointer of value for testing purpose

one := Ptr(1) // one is pointer to int

func RandomDecimal added in v1.10.17

func RandomDecimal() decimal.Decimal

RandomDecimal - returns random decimal value

data := RandomDecimal()

func RandomText added in v1.10.17

func RandomText(n int) string

RandomText - generates random string with fixed size

data := RandomText(10)

Types

This section is empty.

Jump to

Keyboard shortcuts

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