Skip to content

Commit a282951

Browse files
wpaulinoTheBlueMatt
authored andcommitted
Avoid returning user error when stfu is not ready to be sent yet
When we propose quiescence due to a user initiated action, such as a splice, it's possible that the `stfu` message is not ready to be sent out yet due to the state machine pending a change. This would result in an error communicated back to the caller of `ChannelManager::splice_channel`, but this is unnecessary and confusing, the splice is still pending and will be carried out once quiescence is eventually negotiated. Backport of c2b15c2
1 parent 17b99e0 commit a282951

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lightning/src/ln/channel.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13120,7 +13120,13 @@ where
1312013120

1312113121
self.context.channel_state.set_awaiting_quiescence();
1312213122
if self.context.is_live() {
13123-
Ok(Some(self.send_stfu(logger)?))
13123+
match self.send_stfu(logger) {
13124+
Ok(stfu) => Ok(Some(stfu)),
13125+
Err(e) => {
13126+
log_debug!(logger, "{e}");
13127+
Ok(None)
13128+
},
13129+
}
1312413130
} else {
1312513131
log_debug!(logger, "Waiting for peer reconnection to send stfu");
1312613132
Ok(None)

0 commit comments

Comments
 (0)