Skip to content

Commit 891c0cb

Browse files
committed
staticaddr: log deposit state transition only if executed
1 parent 41b7cb5 commit 891c0cb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

staticaddr/deposit/fsm.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,6 @@ func (f *FSM) updateDeposit(ctx context.Context,
378378
return
379379
}
380380

381-
f.Debugf("NextState: %v, PreviousState: %v, Event: %v",
382-
notification.NextState, notification.PreviousState,
383-
notification.Event,
384-
)
385-
386381
type checkStateFunc func(state fsm.StateType) bool
387382
type setStateFunc func(state fsm.StateType)
388383
checkFunc := checkStateFunc(f.deposit.IsInState)
@@ -397,6 +392,11 @@ func (f *FSM) updateDeposit(ctx context.Context,
397392
return
398393
}
399394

395+
f.Debugf("NextState: %v, PreviousState: %v, Event: %v",
396+
notification.NextState, notification.PreviousState,
397+
notification.Event,
398+
)
399+
400400
err := f.cfg.Store.UpdateDeposit(ctx, f.deposit)
401401
if err != nil {
402402
f.Errorf("unable to update deposit: %w", err)

0 commit comments

Comments
 (0)