utils

package
v8.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTxWithRetry

func GetTxWithRetry(ctx context.Context, serviceClient sdktx.ServiceClient, txHash string) (*sdktx.GetTxResponse, error)

GetTxWithRetry polls ServiceClient.GetTx until the tx is indexed or indexerWaitTimeout elapses. The CometBFT TxStatus RPC (used by TxClient.ConfirmTx) and the Cosmos SDK tx indexer (used by ServiceClient.GetTx) are updated asynchronously after a block is committed, so GetTx can return NotFound for a tx that ConfirmTx has just reported as committed. Tests should prefer this helper whenever they need to look up a tx by hash immediately after submitting it.

func SetupTxClient

func SetupTxClient(
	t *testing.T,
	ttlNumBlocks int64,
	squareSize uint64,
	blocksize int64,
	opts ...user.Option,
) (encoding.Config, *user.TxClient, testnode.Context)

func SetupTxClientWithDefaultParams

func SetupTxClientWithDefaultParams(t *testing.T, opts ...user.Option) (encoding.Config, *user.TxClient, testnode.Context)

func VerifyTxResponse

func VerifyTxResponse(
	t *testing.T,
	ctx context.Context,
	serviceClient sdktx.ServiceClient,
	confirmTxResp any,
)

Types

This section is empty.

Jump to

Keyboard shortcuts

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