Skip to content

Commit

Permalink
Remove bad returns in Syncing(Negotiating) (#699)
Browse files Browse the repository at this point in the history
They were causing the inner function to return early and not prepend the
`channel_reestablish`.
  • Loading branch information
pm47 committed Sep 17, 2024
1 parent e45bdc3 commit 848b1bb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ data class Syncing(val state: PersistedChannelState, val channelReestablishSent:
ChannelAction.Message.Send(state.localShutdown),
ChannelAction.Message.Send(closingSigned)
)
return Pair(nextState, actions)
Pair(nextState, actions)
} else {
// we start a new round of negotiation
val closingTxProposed1 = if (state.closingTxProposed.last().isEmpty()) state.closingTxProposed else state.closingTxProposed + listOf(listOf())
Expand All @@ -253,7 +253,7 @@ data class Syncing(val state: PersistedChannelState, val channelReestablishSent:
ChannelAction.Storage.StoreState(nextState),
ChannelAction.Message.Send(state.localShutdown)
)
return Pair(nextState, actions)
Pair(nextState, actions)
}
is Closing, is Closed, is WaitForRemotePublishFutureCommitment -> unhandled(cmd)
}
Expand Down

0 comments on commit 848b1bb

Please sign in to comment.