Skip to content

Commit

Permalink
Clean indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryfan01234 committed Jul 30, 2024
1 parent 8bbbedc commit 294c119
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions protocol/app/ante/sigverify.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,19 @@ func (svd SigVerificationDecorator) AnteHandle(
// `GoodTilBlock` for replay protection.
if !skipSequenceValidation {
if accountpluskeeper.IsTimestampNonce(sig.Sequence) {
err = svd.akp.ProcessTimestampNonce(ctx, acc, sig.Sequence)

if err == nil {
telemetry.IncrCounterWithLabels(
[]string{metrics.TimestampNonce, metrics.Valid, metrics.Count},
1,
[]gometrics.Label{metrics.GetLabelForIntValue(metrics.ExecMode, int(ctx.ExecMode()))},
)
} else {
if err := svd.akp.ProcessTimestampNonce(ctx, acc, sig.Sequence); err != nil {
telemetry.IncrCounterWithLabels(
[]string{metrics.TimestampNonce, metrics.Invalid, metrics.Count},
1,
[]gometrics.Label{metrics.GetLabelForIntValue(metrics.ExecMode, int(ctx.ExecMode()))},
)
return ctx, errorsmod.Wrapf(sdkerrors.ErrWrongSequence, err.Error())
}
telemetry.IncrCounterWithLabels(
[]string{metrics.TimestampNonce, metrics.Valid, metrics.Count},
1,
[]gometrics.Label{metrics.GetLabelForIntValue(metrics.ExecMode, int(ctx.ExecMode()))},
)
} else {
if sig.Sequence != acc.GetSequence() {
labels := make([]gometrics.Label, 0)
Expand Down

0 comments on commit 294c119

Please sign in to comment.