Skip to content

Commit 1ea804a

Browse files
committed
Correct full_stack_target error check patterns
This fixes new errors in `full_stack_target` pointed out by Chaincode's generous fuzzing infrastructure.
1 parent 4dd6142 commit 1ea804a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fuzz/src/full_stack.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,10 @@ pub fn do_test(data: &[u8], logger: &Arc<dyn Logger>) {
635635
// It's possible the channel has been closed in the mean time, but any other
636636
// failure may be a bug.
637637
if let APIError::ChannelUnavailable { err } = e {
638-
if !err.starts_with("Can't find a peer matching the passed counterparty node_id ") {
639-
assert_eq!(err, "No such channel");
640-
}
638+
assert!(
639+
err.starts_with("Can't find a peer matching the passed counterparty node_id ") ||
640+
(err.starts_with("Channel with id ") && err.contains(" not found for the passed counterparty node_id "))
641+
);
641642
} else { panic!(); }
642643
}
643644
pending_funding_signatures.insert(funding_output, tx);

0 commit comments

Comments
 (0)