Skip to content

Commit

Permalink
lnwallet+protofsm: fix logging
Browse files Browse the repository at this point in the history
  • Loading branch information
yyforyongyu committed Mar 3, 2025
1 parent d109107 commit 4663040
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lnwallet/chancloser/rbf_coop_transitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ func (c *ChannelActive) ProcessEvent(event ProtocolEvent, env *Environment,
// also emit similar events like the above to send out shutdown, and
// also disable the channel.
case *ShutdownReceived:
chancloserLog.Infof("ChannelPoint(%v): received shutdown msg")
chancloserLog.Infof("ChannelPoint(%v): received shutdown msg",
env.ChanPoint)

// Validate that they can send the message now, and also that
// they haven't violated their commitment to a prior upfront
Expand All @@ -204,7 +205,7 @@ func (c *ChannelActive) ProcessEvent(event ProtocolEvent, env *Environment,
)
if err != nil {
chancloserLog.Errorf("ChannelPoint(%v): rejecting "+
"shutdown attempt: %v", err)
"shutdown attempt: %v", env.ChanPoint, err)

return nil, err
}
Expand Down Expand Up @@ -302,7 +303,7 @@ func (s *ShutdownPending) ProcessEvent(event ProtocolEvent, env *Environment,
)
if err != nil {
chancloserLog.Errorf("ChannelPoint(%v): rejecting "+
"shutdown attempt: %v", err)
"shutdown attempt: %v", env.ChanPoint, err)

return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion protofsm/state_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ func (s *StateMachine[Event, Env]) executeDaemonEvent(ctx context.Context,
// any preconditions as well as post-send events.
case *SendMsgEvent[Event]:
sendAndCleanUp := func() error {
s.log.DebugS(ctx, "Sending message to target",
s.log.DebugS(ctx, "Sending message:",
btclog.Hex6("target", daemonEvent.TargetPeer.SerializeCompressed()),
"messages", lnutils.SpewLogClosure(daemonEvent.Msgs))

Expand Down

0 comments on commit 4663040

Please sign in to comment.