diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go index 2d50fcc3f6..ffd8193972 100644 --- a/app/ante/handler_options.go +++ b/app/ante/handler_options.go @@ -50,6 +50,9 @@ type HandlerOptions struct { DisabledAuthzMsgs []string ExtraDecorators []sdk.AnteDecorator PendingTxListener PendingTxListener + + // see #494, just for benchmark, don't turn on on production + UnsafeUnorderedTx bool } func (options HandlerOptions) validate() error { @@ -128,8 +131,10 @@ func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler { return ctx, err } - if err := CheckEthSenderNonce(ctx, tx, options.AccountKeeper); err != nil { - return ctx, err + if !options.UnsafeUnorderedTx { + if err := CheckEthSenderNonce(ctx, tx, options.AccountKeeper); err != nil { + return ctx, err + } } extraDecorators := options.ExtraDecorators