Skip to content

Commit

Permalink
fix: pass msg into go func
Browse files Browse the repository at this point in the history
  • Loading branch information
arirubinstein authored and mergify[bot] committed Feb 21, 2023
1 parent 92d2ac3 commit 2b4248c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions golang/cosmos/ante/vm_admission.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ func (ad AdmissionDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate boo
if err := camsg.CheckAdmissibility(ctx, ad.data); err != nil {
errors = append(errors, err)
if !simulate {
defer func() {
defer func(msg sdk.Msg) {
telemetry.IncrCounterWithLabels(
[]string{"tx", "ante", "admission_refused"},
1,
[]metrics.Label{
telemetry.NewLabel("msg", sdk.MsgTypeURL(msg)),
},
)
}()
}(msg)
}
}
}
Expand Down

0 comments on commit 2b4248c

Please sign in to comment.