Skip to content

Commit d6e26d7

Browse files
committed
f - error when pending_splice is None
1 parent 2a31392 commit d6e26d7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lightning/src/ln/channel.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8511,10 +8511,10 @@ impl<SP: Deref> FundedChannel<SP> where
85118511
let pending_splice = match self.pending_splice.as_ref() {
85128512
Some(pending_splice) => pending_splice,
85138513
None => {
8514-
// TODO: Move pending_funding into pending_splice?
8514+
// TODO: Move pending_funding into pending_splice
85158515
debug_assert!(false);
8516-
// TODO: Error instead?
8517-
return Ok((None, None));
8516+
let err = "expected a pending splice".to_string();
8517+
return Err(ClosureReason::ProcessingError { err });
85188518
},
85198519
};
85208520
let funding = self.pending_funding.get(confirmed_funding_index).unwrap();
@@ -8661,10 +8661,10 @@ impl<SP: Deref> FundedChannel<SP> where
86618661
let pending_splice = match self.pending_splice.as_ref() {
86628662
Some(pending_splice) => pending_splice,
86638663
None => {
8664-
// TODO: Move pending_funding into pending_splice?
8664+
// TODO: Move pending_funding into pending_splice
86658665
debug_assert!(false);
8666-
// TODO: Error instead?
8667-
return Ok((None, timed_out_htlcs, None));
8666+
let err = "expected a pending splice".to_string();
8667+
return Err(ClosureReason::ProcessingError { err });
86688668
},
86698669
};
86708670
let funding = self.pending_funding.get(confirmed_funding_index).unwrap();

0 commit comments

Comments
 (0)