From ff44b3b640ec760bd6a445500ca25025f3a4c1b4 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Fri, 21 Mar 2025 14:46:16 +0100 Subject: [PATCH] staticaddr: log deposit state transition only if executed --- staticaddr/deposit/fsm.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/staticaddr/deposit/fsm.go b/staticaddr/deposit/fsm.go index b5b4ad31..fd41c66d 100644 --- a/staticaddr/deposit/fsm.go +++ b/staticaddr/deposit/fsm.go @@ -378,11 +378,6 @@ func (f *FSM) updateDeposit(ctx context.Context, return } - f.Debugf("NextState: %v, PreviousState: %v, Event: %v", - notification.NextState, notification.PreviousState, - notification.Event, - ) - type checkStateFunc func(state fsm.StateType) bool type setStateFunc func(state fsm.StateType) checkFunc := checkStateFunc(f.deposit.IsInState) @@ -397,6 +392,11 @@ func (f *FSM) updateDeposit(ctx context.Context, return } + f.Debugf("NextState: %v, PreviousState: %v, Event: %v", + notification.NextState, notification.PreviousState, + notification.Event, + ) + err := f.cfg.Store.UpdateDeposit(ctx, f.deposit) if err != nil { f.Errorf("unable to update deposit: %w", err)