tests

package
v0.0.0-...-97e54d3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: MIT Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout = errors.New("timeout")
)

Functions

func GenerateKeyAndAddr

func GenerateKeyAndAddr(t *testing.T) (*ecdsa.PrivateKey, types.Address)

func GenerateTestMultiAddr

func GenerateTestMultiAddr(t *testing.T) multiaddr.Multiaddr

func GetFreePort

func GetFreePort() (port int, err error)

GetFreePort asks the kernel for a free open port that is ready to use

func RetryUntilTimeout

func RetryUntilTimeout(ctx context.Context, f func() (interface{}, bool)) (interface{}, error)

func WaitForNonce

func WaitForNonce(
	ctx context.Context,
	ethClient *jsonrpc.Eth,
	addr web3.Address,
	expectedNonce uint64,
) (
	interface{},
	error,
)

func WaitForReceipt

func WaitForReceipt(ctx context.Context, client *jsonrpc.Eth, hash web3.Hash) (*web3.Receipt, error)

WaitForReceipt waits transaction receipt

func WaitUntilTxPoolEmpty

func WaitUntilTxPoolEmpty(
	ctx context.Context,
	client txpoolOp.TxnPoolOperatorClient,
) (
	*txpoolOp.TxnPoolStatusResp,
	error,
)

WaitUntilTxPoolEmpty waits until node has 0 transactions in txpool, otherwise returns timeout

Types

This section is empty.

Jump to

Keyboard shortcuts

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