Skip to content

Commit

Permalink
fix(cosmos): don't log expected missing tx context of CORE_EVAL
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed May 12, 2023
1 parent ac00af7 commit 5516913
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion golang/cosmos/x/swingset/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ func (k Keeper) pushAction(ctx sdk.Context, inboundQueuePath string, action vm.J
}
msgIdx, msgIdxOk := ctx.Context().Value(baseapp.TxMsgIdxContextKey).(int)
if !txHashOk || !msgIdxOk {
stdlog.Printf("error while extracting context for action %q\n", action)
switch action.(type) {
case *coreEvalAction:
// This is expected for CORE_EVAL since it's not in a transaction
// (deferred by governance to a BeginBlocker).
default:
stdlog.Printf("error while extracting context for action %q\n", action)
}
}
record := inboundQueueRecord{Action: action, Context: actionContext{BlockHeight: ctx.BlockHeight(), TxHash: txHash, MsgIdx: msgIdx}}
bz, err := json.Marshal(record)
Expand Down

0 comments on commit 5516913

Please sign in to comment.