Skip to content

Commit 73abfe9

Browse files
committed
Minor review comments
1 parent 5eb912c commit 73abfe9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4239,7 +4239,7 @@ where
42394239
/// TODO(splicing): Implementation is currently incomplete.
42404240
/// Note: Currently only splice-in is supported (increase in channel capacity), splice-out is not.
42414241
/// - our_funding_contribution_satoshis: the amount contributed by us to the channel. This will increase our channel balance.
4242-
/// - our_funding_inputs: the funding inputs provided by us. If our contribution is positive, our funding inputs must cover at most that amount.
4242+
/// - our_funding_inputs: the funding inputs provided by us. If our contribution is positive, our funding inputs must cover at least that amount.
42434243
#[cfg(splicing)]
42444244
pub fn splice_channel(
42454245
&self, channel_id: &ChannelId, counterparty_node_id: &PublicKey, our_funding_contribution_satoshis: i64,
@@ -4257,14 +4257,12 @@ where
42574257
match peer_state.channel_by_id.entry(*channel_id) {
42584258
hash_map::Entry::Occupied(mut chan_phase_entry) => {
42594259
if let Some(chan) = chan_phase_entry.get_mut().as_funded_mut() {
4260-
let msg = match chan.splice_channel(our_funding_contribution_satoshis, funding_feerate_perkw, locktime) {
4261-
Ok(msg) => msg,
4262-
Err(err) => return Err(APIError::APIMisuseError {
4260+
let msg = chan.splice_channel(our_funding_contribution_satoshis, funding_feerate_perkw, locktime)
4261+
.map_err(|err| APIError::APIMisuseError {
42634262
err: format!(
42644263
"Cannot initiate Splicing, {}, channel ID {}", err, channel_id
42654264
)
4266-
}),
4267-
};
4265+
})?;
42684266

42694267
peer_state.pending_msg_events.push(events::MessageSendEvent::SendSpliceInit {
42704268
node_id: *counterparty_node_id,

0 commit comments

Comments
 (0)