From ffb7e32499d40f02280bbfc86f6a69804df08608 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 1ca93f602..137d7ba3e 100644 --- a/x/accesscontrol/keeper/keeper.go +++ b/x/accesscontrol/keeper/keeper.go @@ -525,6 +525,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) {