File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -699,6 +699,10 @@ var allTestCases = []*lntest.TestCase{
699
699
Name : "rbf coop close" ,
700
700
TestFunc : testCoopCloseRbf ,
701
701
},
702
+ {
703
+ Name : "rbf coop close disconnect" ,
704
+ TestFunc : testRBFCoopCloseDisconnect ,
705
+ },
702
706
{
703
707
Name : "bump fee low budget" ,
704
708
TestFunc : testBumpFeeLowBudget ,
Original file line number Diff line number Diff line change @@ -131,3 +131,25 @@ func testCoopCloseRbf(ht *lntest.HarnessTest) {
131
131
aliceClosingTxid := ht .WaitForChannelCloseEvent (aliceCloseStream )
132
132
ht .AssertTxInBlock (block , aliceClosingTxid )
133
133
}
134
+
135
+ // testRBFCoopCloseDisconnect tests that when a node disconnects that the node
136
+ // is properly disconnected.
137
+ func testRBFCoopCloseDisconnect (ht * lntest.HarnessTest ) {
138
+ rbfCoopFlags := []string {"--protocol.rbf-coop-close" }
139
+
140
+ // To kick things off, we'll create two new nodes, then fund them with
141
+ // enough coins to make a 50/50 channel.
142
+ cfgs := [][]string {rbfCoopFlags , rbfCoopFlags }
143
+ params := lntest.OpenChannelParams {
144
+ Amt : btcutil .Amount (1000000 ),
145
+ PushAmt : btcutil .Amount (1000000 / 2 ),
146
+ }
147
+ _ , nodes := ht .CreateSimpleNetwork (cfgs , params )
148
+ alice , bob := nodes [0 ], nodes [1 ]
149
+
150
+ // Make sure the nodes are connected.
151
+ ht .AssertConnected (alice , bob )
152
+
153
+ // Disconnect Bob from Alice.
154
+ ht .DisconnectNodes (alice , bob )
155
+ }
You can’t perform that action at this time.
0 commit comments