Skip to content

Commit 6ca6c49

Browse files
committed
Minor review comments
1 parent 07d53ae commit 6ca6c49

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
@@ -4123,7 +4123,7 @@ where
41234123
/// TODO(splicing): Implementation is currently incomplete.
41244124
/// Note: Currently only splice-in is supported (increase in channel capacity), splice-out is not.
41254125
/// - our_funding_contribution_satoshis: the amount contributed by us to the channel. This will increase our channel balance.
4126-
/// - our_funding_inputs: the funding inputs provided by us. If our contribution is positive, our funding inputs must cover at most that amount.
4126+
/// - our_funding_inputs: the funding inputs provided by us. If our contribution is positive, our funding inputs must cover at least that amount.
41274127
#[cfg(splicing)]
41284128
pub fn splice_channel(
41294129
&self, channel_id: &ChannelId, counterparty_node_id: &PublicKey, our_funding_contribution_satoshis: i64,
@@ -4141,14 +4141,12 @@ where
41414141
match peer_state.channel_by_id.entry(*channel_id) {
41424142
hash_map::Entry::Occupied(mut chan_phase_entry) => {
41434143
if let ChannelPhase::Funded(chan) = chan_phase_entry.get_mut() {
4144-
let msg = match chan.splice_channel(our_funding_contribution_satoshis, funding_feerate_perkw, locktime) {
4145-
Ok(msg) => msg,
4146-
Err(err) => return Err(APIError::APIMisuseError {
4144+
let msg = chan.splice_channel(our_funding_contribution_satoshis, funding_feerate_perkw, locktime)
4145+
.map_err(|err| APIError::APIMisuseError {
41474146
err: format!(
41484147
"Cannot initiate Splicing, {}, channel ID {}", err, channel_id
41494148
)
4150-
}),
4151-
};
4149+
})?;
41524150

41534151
peer_state.pending_msg_events.push(events::MessageSendEvent::SendSpliceInit {
41544152
node_id: *counterparty_node_id,

0 commit comments

Comments
 (0)