File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
crates/fiber-lib/src/fiber/tests Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -4692,7 +4692,7 @@ async fn test_shutdown_channel_with_large_size_shutdown_script_should_fail() {
46924692 let node_a_funding_amount = 100000000000 ;
46934693 let node_b_funding_amount = 6200000000 ;
46944694
4695- let ( _node_a , node_b, new_channel_id) =
4695+ let ( node_a , node_b, new_channel_id) =
46964696 create_nodes_with_established_channel ( node_a_funding_amount, node_b_funding_amount, false )
46974697 . await ;
46984698
@@ -4717,6 +4717,28 @@ async fn test_shutdown_channel_with_large_size_shutdown_script_should_fail() {
47174717 . err( )
47184718 . unwrap( )
47194719 . contains( "Local balance is not enough to pay the fee" ) ) ;
4720+
4721+ let message = |rpc_reply| {
4722+ NetworkActorMessage :: Command ( NetworkActorCommand :: ControlFiberChannel (
4723+ ChannelCommandWithId {
4724+ channel_id : new_channel_id,
4725+ command : ChannelCommand :: Shutdown (
4726+ ShutdownCommand {
4727+ close_script : Script :: new_builder ( ) . args ( [ 0u8 ; 21 ] . pack ( ) ) . build ( ) ,
4728+ fee_rate : FeeRate :: from_u64 ( u64:: MAX ) ,
4729+ force : false ,
4730+ } ,
4731+ rpc_reply,
4732+ ) ,
4733+ } ,
4734+ ) )
4735+ } ;
4736+
4737+ let shutdown_channel_result = call ! ( node_a. network_actor, message) . expect ( "node_b alive" ) ;
4738+ assert ! ( shutdown_channel_result
4739+ . err( )
4740+ . unwrap( )
4741+ . contains( "Local balance is not enough to pay the fee" ) ) ;
47204742}
47214743
47224744#[ tokio:: test]
You can’t perform that action at this time.
0 commit comments