utils

package
v2.0.0-...-3c1199b Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFuncIfNoError

func ApplyFuncIfNoError(ctx sdk.Context, f func(ctx sdk.Context) error) (err error)

ApplyFuncIfNoError This function lets you run the function f, but if theres an error or panic drop the state machine change and log the error. If there is no error, proceeds as normal (but with some slowdown due to SDK store weirdness) Try to avoid usage of iterators in f.

func PrintPanicRecoveryError

func PrintPanicRecoveryError(ctx sdk.Context, recoveryError interface{})

PrintPanicRecoveryError error logs the recoveryError, along with the stacktrace, if it can be parsed. If not emits them to stdout.

func SortSlice

func SortSlice[T constraints.Ordered](s []T)

func ValidateProofOps

func ValidateProofOps(ctx sdk.Context, ibcKeeper *ibcKeeper.Keeper, connectionID string, chainID string, height int64, module string, key []byte, data []byte, proofOps *crypto.ProofOps) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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