diff --git a/itest/list_on_test.go b/itest/list_on_test.go index 7263b2451..5dacc0b1c 100644 --- a/itest/list_on_test.go +++ b/itest/list_on_test.go @@ -699,6 +699,10 @@ var allTestCases = []*lntest.TestCase{ Name: "rbf coop close", TestFunc: testCoopCloseRbf, }, + { + Name: "rbf coop close disconnect", + TestFunc: testRBFCoopCloseDisconnect, + }, { Name: "bump fee low budget", TestFunc: testBumpFeeLowBudget, diff --git a/itest/lnd_coop_close_rbf_test.go b/itest/lnd_coop_close_rbf_test.go index 870334648..5f8b15d40 100644 --- a/itest/lnd_coop_close_rbf_test.go +++ b/itest/lnd_coop_close_rbf_test.go @@ -131,3 +131,25 @@ func testCoopCloseRbf(ht *lntest.HarnessTest) { aliceClosingTxid := ht.WaitForChannelCloseEvent(aliceCloseStream) ht.AssertTxInBlock(block, aliceClosingTxid) } + +// testRBFCoopCloseDisconnect tests that when a node disconnects that the node +// is properly disconnected. +func testRBFCoopCloseDisconnect(ht *lntest.HarnessTest) { + rbfCoopFlags := []string{"--protocol.rbf-coop-close"} + + // To kick things off, we'll create two new nodes, then fund them with + // enough coins to make a 50/50 channel. + cfgs := [][]string{rbfCoopFlags, rbfCoopFlags} + params := lntest.OpenChannelParams{ + Amt: btcutil.Amount(1000000), + PushAmt: btcutil.Amount(1000000 / 2), + } + _, nodes := ht.CreateSimpleNetwork(cfgs, params) + alice, bob := nodes[0], nodes[1] + + // Make sure the nodes are connected. + ht.AssertConnected(alice, bob) + + // Disconnect Bob from Alice. + ht.DisconnectNodes(alice, bob) +}