Skip to content

Commit 604762a

Browse files
committed
f - ensure splice contribution is non-zero
1 parent 20b6809 commit 604762a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

lightning/src/ln/channel.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10676,6 +10676,15 @@ where
1067610676
// TODO(splicing): check for quiescence
1067710677

1067810678
let our_funding_contribution = contribution.value();
10679+
if our_funding_contribution == SignedAmount::ZERO {
10680+
return Err(APIError::APIMisuseError {
10681+
err: format!(
10682+
"Channel {} cannot be spliced; contribution cannot be zero",
10683+
self.context.channel_id(),
10684+
),
10685+
});
10686+
}
10687+
1067910688
if our_funding_contribution > SignedAmount::MAX_MONEY {
1068010689
return Err(APIError::APIMisuseError {
1068110690
err: format!(

0 commit comments

Comments
 (0)