Skip to content

Commit c2b15c2

Browse files
committed
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.
1 parent e42e74e commit c2b15c2

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
@@ -13099,7 +13099,13 @@ where
1309913099

1310013100
self.context.channel_state.set_awaiting_quiescence();
1310113101
if self.context.is_live() {
13102-
Ok(Some(self.send_stfu(logger)?))
13102+
match self.send_stfu(logger) {
13103+
Ok(stfu) => Ok(Some(stfu)),
13104+
Err(e) => {
13105+
log_debug!(logger, "{e}");
13106+
Ok(None)
13107+
},
13108+
}
1310313109
} else {
1310413110
log_debug!(logger, "Waiting for peer reconnection to send stfu");
1310513111
Ok(None)

0 commit comments

Comments
 (0)