ante

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 3 Imported by: 103

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CircuitBreaker

type CircuitBreaker interface {
	IsAllowed(ctx context.Context, typeURL string) (bool, error)
}

CircuitBreaker is an interface that defines the methods for a circuit breaker.

type CircuitBreakerDecorator

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

CircuitBreakerDecorator is an AnteDecorator that checks if the transaction type is allowed to enter the mempool or be executed

func NewCircuitBreakerDecorator

func NewCircuitBreakerDecorator(ck CircuitBreaker) CircuitBreakerDecorator

func (CircuitBreakerDecorator) AnteHandle

func (cbd CircuitBreakerDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)

If you copy this as reference and your app has the authz module enabled, you must either: - recursively check for nested authz.Exec messages in this function. - or error early if a nested authz grant is found. The circuit AnteHandler handles this with baseapp's service router: https://github.com/cosmos/cosmos-sdk/issues/18632.

Jump to

Keyboard shortcuts

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