testutil

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B642byte

func B642byte(tb testing.TB, s string) []byte

func Hex2byte

func Hex2byte(tb testing.TB, s string) []byte

Types

type MockBlockStore added in v1.0.3

type MockBlockStore struct {
	// contains filtered or unexported fields
}

func (*MockBlockStore) AddTxToBlock added in v1.4.0

func (b *MockBlockStore) AddTxToBlock(tx []byte)

func (*MockBlockStore) EndBlock added in v1.4.0

func (b *MockBlockStore) EndBlock() int64

func (*MockBlockStore) Get added in v1.0.3

func (b *MockBlockStore) Get(height int64) *tmtypes.Block

func (*MockBlockStore) GetByHash added in v1.0.3

func (b *MockBlockStore) GetByHash(hash []byte) *tmtypes.Block

func (*MockBlockStore) Height added in v1.4.0

func (b *MockBlockStore) Height() int64

func (*MockBlockStore) Init added in v1.0.3

func (b *MockBlockStore) Init()

func (*MockBlockStore) NewBlock added in v1.4.0

func (b *MockBlockStore) NewBlock(height int64)

type Random added in v1.3.0

type Random struct {
	// contains filtered or unexported fields
}

func NewRandom added in v1.3.0

func NewRandom(seed int64) Random

func (*Random) Random32 added in v1.8.0

func (r *Random) Random32() [32]byte

func (*Random) RandomBytes added in v1.3.0

func (r *Random) RandomBytes(n int) []byte

func (*Random) RandomInZKField added in v1.3.0

func (r *Random) RandomInZKField() []byte

RandomInZKField returns a random litte-endian encoded element in the ZK SNARK field.

func (*Random) RandomIntn added in v1.3.0

func (r *Random) RandomIntn(n int) int

type TestHTTPclient added in v1.4.0

type TestHTTPclient struct {
	// contains filtered or unexported fields
}

func NewTestHTTPclient added in v1.4.0

func NewTestHTTPclient(t testing.TB, addr *url.URL, bearerToken *uuid.UUID) *TestHTTPclient

func (*TestHTTPclient) Request added in v1.4.0

func (c *TestHTTPclient) Request(method string, jsonBody any, urlPath ...string) ([]byte, int)

Jump to

Keyboard shortcuts

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