From 907b03fc89c7ad90e8b2bc4c82adff90ca973c61 Mon Sep 17 00:00:00 2001 From: codchen Date: Wed, 22 Nov 2023 13:15:36 +0800 Subject: [PATCH] Set TxIndex before generating dependencies (#358) ## Describe your changes and provide context We need to make `TxIndex` available during dependency generation so that we can derive the corresponding temporary intermediate account and coinbase account for the message ## Testing performed to validate your change --- x/accesscontrol/keeper/keeper.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/accesscontrol/keeper/keeper.go b/x/accesscontrol/keeper/keeper.go index f047f2c46..869e616b2 100644 --- a/x/accesscontrol/keeper/keeper.go +++ b/x/accesscontrol/keeper/keeper.go @@ -588,6 +588,7 @@ func (k Keeper) BuildDependencyDag(ctx sdk.Context, txDecoder sdk.TxDecoder, ant // add Access ops for msg for anteMsg dependencyDag.AddAccessOpsForMsg(acltypes.ANTE_MSG_INDEX, txIndex, anteAccessOpsList) + ctx = ctx.WithTxIndex(txIndex) msgs := tx.GetMsgs() for messageIndex, msg := range msgs { if types.IsGovMessage(msg) {