consensus

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessConsensusMessages

func ProcessConsensusMessages(
	ctx sdk.Context,
	appCodec codec.Codec,
	admissionHandler AdmissionHandler,
	msgServiceRouter *baseapp.MsgServiceRouter,
	consensusMsgs []*prototypes.Any,
) []*abci.ConsensusMessageResponse

ProcessConsensusMessages processes a batch of consensus messages. It unpacks each message, checks if it is allowed, executes it, and returns the responses.

Types

type AdmissionHandler

type AdmissionHandler func(ctx sdk.Context, msg sdk.Msg) error

AdmissionHandler is a function used to validate if a Consensus Message is valid

func AllowedMessagesHandler

func AllowedMessagesHandler(messageNames []string) AdmissionHandler

AllowedMessagesHandler returns an AdmissionHandler that only allows messages with the given names

Jump to

Keyboard shortcuts

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