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 @@ -38,6 +38,7 @@ use lightning::ln::msgs::DecodeError;
3838use lightning:: routing:: router:: get_route;
3939use lightning:: routing:: network_graph:: NetGraphMsgHandler ;
4040use lightning:: util:: config:: UserConfig ;
41+ use lightning:: util:: errors:: APIError ;
4142use lightning:: util:: events:: { EventsProvider , Event } ;
4243use lightning:: util:: enforcing_trait_impls:: EnforcingSigner ;
4344use lightning:: util:: logger:: Logger ;
@@ -516,7 +517,13 @@ pub fn do_test(data: &[u8], logger: &Arc<dyn Logger>) {
516517 continue ' outer_loop;
517518 }
518519 } ;
519- channelmanager. funding_transaction_generated ( & funding_generation. 0 , tx. clone ( ) ) . unwrap ( ) ;
520+ if let Err ( e) = channelmanager. funding_transaction_generated ( & funding_generation. 0 , tx. clone ( ) ) {
521+ // Its possible the channel has been closed in the mean time, but any other
522+ // failure may be a bug.
523+ if let APIError :: ChannelUnavailable { err } = e {
524+ assert_eq ! ( err, "No such channel" ) ;
525+ } else { panic ! ( ) ; }
526+ }
520527 pending_funding_signatures. insert ( funding_output, tx) ;
521528 }
522529 } ,
You can’t perform that action at this time.
0 commit comments