File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ use lightning::ln::msgs::DecodeError;
3939use lightning:: routing:: router:: get_route;
4040use lightning:: routing:: network_graph:: NetGraphMsgHandler ;
4141use lightning:: util:: config:: UserConfig ;
42+ use lightning:: util:: errors:: APIError ;
4243use lightning:: util:: events:: Event ;
4344use lightning:: util:: enforcing_trait_impls:: EnforcingSigner ;
4445use lightning:: util:: logger:: Logger ;
@@ -531,7 +532,13 @@ pub fn do_test(data: &[u8], logger: &Arc<dyn Logger>) {
531532 continue ' outer_loop;
532533 }
533534 } ;
534- channelmanager. funding_transaction_generated ( & funding_generation. 0 , tx. clone ( ) ) . unwrap ( ) ;
535+ if let Err ( e) = channelmanager. funding_transaction_generated ( & funding_generation. 0 , tx. clone ( ) ) {
536+ // Its possible the channel has been closed in the mean time, but any other
537+ // failure may be a bug.
538+ if let APIError :: ChannelUnavailable { err } = e {
539+ assert_eq ! ( err, "No such channel" ) ;
540+ } else { panic ! ( ) ; }
541+ }
535542 pending_funding_signatures. insert ( funding_output, tx) ;
536543 }
537544 } ,
You can’t perform that action at this time.
0 commit comments