@@ -3096,6 +3096,14 @@ func testCustomChannelsHtlcForceClose(ctxb context.Context, net *NetworkHarness,
30963096	t  * harnessTest ) {
30973097
30983098	runCustomChannelsHtlcForceClose (ctxb , t , net , false )
3099+ }
3100+ 
3101+ // testCustomChannelsHtlcForceCloseMpp tests that we can force close a channel 
3102+ // with HTLCs in both directions and that the HTLC outputs are correctly 
3103+ // swept, using MPP. 
3104+ func  testCustomChannelsHtlcForceCloseMpp (ctxb  context.Context ,
3105+ 	net  * NetworkHarness , t  * harnessTest ) {
3106+ 
30993107	runCustomChannelsHtlcForceClose (ctxb , t , net , true )
31003108}
31013109
@@ -3257,6 +3265,7 @@ func runCustomChannelsHtlcForceClose(ctx context.Context, t *harnessTest,
32573265		numAdditionalShards  :=  assetInvoiceAmt  /  assetsPerMPPShard 
32583266		numHtlcs  +=  numAdditionalShards  *  2 
32593267	}
3268+ 	t .Logf ("Asserting both Alice and Bob have %d HTLCs..." , numHtlcs )
32603269	assertNumHtlcs (t .t , alice , numHtlcs )
32613270	assertNumHtlcs (t .t , bob , numHtlcs )
32623271
@@ -3523,6 +3532,13 @@ func runCustomChannelsHtlcForceClose(ctx context.Context, t *harnessTest,
35233532
35243533	t .Logf ("Confirming initial HTLC timeout txns" )
35253534
3535+ 	timeoutSweeps , err  :=  waitForNTxsInMempool (
3536+ 		net .Miner .Client , 2 , shortTimeout ,
3537+ 	)
3538+ 	require .NoError (t .t , err )
3539+ 
3540+ 	t .Logf ("Asserting balance on sweeps: %v" , timeoutSweeps )
3541+ 
35263542	// Finally, we'll mine a single block to confirm them. 
35273543	mineBlocks (t , net , 1 , 2 )
35283544
0 commit comments