feat: backport unordered transactions (#23708)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Facundo <facundomedica@gmail.com> Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com> Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
co-authored by
Aleksandr Bezobchuk
yihuang
Facundo
Facundo Medica
Alex | Interchain Labs
parent
ff779eca8d
commit
7f7c41e4aa
+7
-1
@@ -25,6 +25,7 @@ import (
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx"
|
||||
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
|
||||
)
|
||||
|
||||
@@ -40,7 +41,9 @@ import (
|
||||
type App struct {
|
||||
*baseapp.BaseApp
|
||||
|
||||
ModuleManager *module.Manager
|
||||
ModuleManager *module.Manager
|
||||
UnorderedTxManager *unorderedtx.Manager
|
||||
|
||||
configurator module.Configurator
|
||||
config *runtimev1alpha1.Module
|
||||
storeKeys []storetypes.StoreKey
|
||||
@@ -157,6 +160,9 @@ func (a *App) Load(loadLatest bool) error {
|
||||
|
||||
// PreBlocker application updates every pre block
|
||||
func (a *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) {
|
||||
if a.UnorderedTxManager != nil {
|
||||
a.UnorderedTxManager.OnNewBlock(ctx.BlockTime())
|
||||
}
|
||||
return a.ModuleManager.PreBlock(ctx)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user