Documentation ¶
Index ¶
- func GetDecodedTxs(txDecoder sdk.TxDecoder, txs [][]byte) ([]sdk.Tx, error)
- func GetMaxTxBytesForLane(maxTxBytes, totalTxBytes int64, ratio sdk.Dec) int64
- func GetTxHashStr(txEncoder sdk.TxEncoder, tx sdk.Tx) ([]byte, string, error)
- func RemoveTxsFromLane(txs map[sdk.Tx]struct{}, mempool sdkmempool.Mempool) error
- type IgnoreDecorator
- type Lane
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDecodedTxs ¶
GetDecodedTxs returns the decoded transactions from the given bytes.
func GetMaxTxBytesForLane ¶
GetMaxTxBytesForLane returns the maximum number of bytes that can be included in the proposal for the given lane.
func GetTxHashStr ¶
GetTxHashStr returns the hex-encoded hash of the transaction alongside the transaction bytes.
func RemoveTxsFromLane ¶
func RemoveTxsFromLane(txs map[sdk.Tx]struct{}, mempool sdkmempool.Mempool) error
RemoveTxsFromLane removes the transactions from the given lane's mempool.
Types ¶
type IgnoreDecorator ¶
type IgnoreDecorator struct {
// contains filtered or unexported fields
}
IgnoreDecorator is an AnteDecorator that wraps an existing AnteDecorator. It allows for the AnteDecorator to be ignored for specified lanes.
func NewIgnoreDecorator ¶
func NewIgnoreDecorator(decorator sdk.AnteDecorator, lanes ...Lane) *IgnoreDecorator
NewIgnoreDecorator returns a new IgnoreDecorator instance.
func (IgnoreDecorator) AnteHandle ¶
func (sd IgnoreDecorator) AnteHandle( ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler, ) (sdk.Context, error)
AnteHandle implements the sdk.AnteDecorator interface. If the transaction belongs to one of the lanes, the next AnteHandler is called. Otherwise, the decorator's AnteHandler is called.