ante

package
v16.0.0-...-9a9376b Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SendBlockDecorator

type SendBlockDecorator struct {
	Options SendBlockOptions
}

func NewSendBlockDecorator

func NewSendBlockDecorator(options SendBlockOptions) *SendBlockDecorator

NewSendBlockDecorator are a part of auth module AnteDecorators that are recursively chained together into a single AntiHandler.

func (*SendBlockDecorator) AnteHandle

func (decorator *SendBlockDecorator) AnteHandle(
	ctx sdk.Context,
	tx sdk.Tx,
	simulate bool,
	next sdk.AnteHandler,
) (newCtx sdk.Context, err error)

AnteHandle is used for performing basic validity checks on a transaction such that it can be thrown out of the mempool.

func (*SendBlockDecorator) CheckIfBlocked

func (decorator *SendBlockDecorator) CheckIfBlocked(msgs []sdk.Msg) error

CheckIfBlocked returns error if following are true: 1. decorator.permittedOnlySendTo has msg.GetSigners() has its key, and 2-1. msg is not a SendMsg, or 2-2. msg is SendMsg and the destination is not decorator.permittedOnlySendTo[msg.Sender]

type SendBlockOptions

type SendBlockOptions struct {
	PermittedOnlySendTo map[string]string
}

func NewSendBlockOptions

func NewSendBlockOptions(appOpts servertypes.AppOptions) SendBlockOptions

NewSendBlockOptions returns options for sending new blocks.

Jump to

Keyboard shortcuts

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