testsuite

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 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, withTxs bool) (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 RandomAddress

func RandomAddress() string

RandomAddress - returns random address

func RandomHash

func RandomHash(length int) []byte

RandomHash - returns random hash with fixed size

Types

This section is empty.

Jump to

Keyboard shortcuts

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