consistency in antehandler (#9144)
This commit is contained in:
parent
83645e0360
commit
b1cf4793d0
|
@ -43,7 +43,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
|
|||
NewRejectExtensionOptionsDecorator(),
|
||||
NewMempoolFeeDecorator(),
|
||||
NewValidateBasicDecorator(),
|
||||
TxTimeoutHeightDecorator{},
|
||||
NewTxTimeoutHeightDecorator(),
|
||||
NewValidateMemoDecorator(options.AccountKeeper),
|
||||
NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
|
||||
NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper),
|
||||
|
|
|
@ -179,6 +179,12 @@ type (
|
|||
}
|
||||
)
|
||||
|
||||
// TxTimeoutHeightDecorator defines an AnteHandler decorator that checks for a
|
||||
// tx height timeout.
|
||||
func NewTxTimeoutHeightDecorator() TxTimeoutHeightDecorator {
|
||||
return TxTimeoutHeightDecorator{}
|
||||
}
|
||||
|
||||
// AnteHandle implements an AnteHandler decorator for the TxHeightTimeoutDecorator
|
||||
// type where the current block height is checked against the tx's height timeout.
|
||||
// If a height timeout is provided (non-zero) and is less than the current block
|
||||
|
|
|
@ -177,7 +177,7 @@ func (suite *AnteTestSuite) TestConsumeGasForTxSize() {
|
|||
func (suite *AnteTestSuite) TestTxHeightTimeoutDecorator() {
|
||||
suite.SetupTest(true)
|
||||
|
||||
antehandler := sdk.ChainAnteDecorators(ante.TxTimeoutHeightDecorator{})
|
||||
antehandler := sdk.ChainAnteDecorators(ante.NewTxTimeoutHeightDecorator())
|
||||
|
||||
// keys and addresses
|
||||
priv1, _, addr1 := testdata.KeyTestPubAddr()
|
||||
|
|
Loading…
Reference in New Issue