docs: update docs for Check/DeliverTx middlewares (#11918)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
This commit is contained in:
co-authored by
Aleksandr Bezobchuk
parent
b0edb6d3ef
commit
9d8beff497
@@ -5,9 +5,11 @@ type Handler func(ctx Context, msg Msg) (*Result, error)
|
||||
|
||||
// AnteHandler authenticates transactions, before their internal messages are handled.
|
||||
// If newCtx.IsZero(), ctx is used instead.
|
||||
// DEPRECATED: use middleware instead
|
||||
type AnteHandler func(ctx Context, tx Tx, simulate bool) (newCtx Context, err error)
|
||||
|
||||
// AnteDecorator wraps the next AnteHandler to perform custom pre- and post-processing.
|
||||
// DEPRECATED: use middleware instead
|
||||
type AnteDecorator interface {
|
||||
AnteHandle(ctx Context, tx Tx, simulate bool, next AnteHandler) (newCtx Context, err error)
|
||||
}
|
||||
@@ -26,6 +28,7 @@ type AnteDecorator interface {
|
||||
// transactions to be processed with an infinite gasmeter and open a DOS attack vector.
|
||||
// Use `ante.SetUpContextDecorator` or a custom Decorator with similar functionality.
|
||||
// Returns nil when no AnteDecorator are supplied.
|
||||
// DEPRECATED: use middleware instead
|
||||
func ChainAnteDecorators(chain ...AnteDecorator) AnteHandler {
|
||||
if len(chain) == 0 {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user