Skip to content

Commit 3dfdbb9

Browse files
committed
itest: Add required disconnect in revoke test
This adds a disconnection between nodes in the testRevokedCloseRetributionZeroValueRemoteOutput integration test. This disconnection is necessary to ensure the nodes don't reconnect upon restarting and disable the channel used for retribution tests.
1 parent cbfd17e commit 3dfdbb9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lnd_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6726,7 +6726,10 @@ func testRevokedCloseRetributionZeroValueRemoteOutput(net *lntest.NetworkHarness
67266726
// protection logic automatically.
67276727
dave, err := net.NewNode(
67286728
"Dave",
6729-
[]string{"--debughtlc", "--hodl.exit-settle", "--nolisten"},
6729+
[]string{
6730+
"--debughtlc", "--hodl.exit-settle", "--nolisten",
6731+
"--unsafe-disconnect",
6732+
},
67306733
)
67316734
if err != nil {
67326735
t.Fatalf("unable to create new node: %v", err)
@@ -6824,6 +6827,14 @@ func testRevokedCloseRetributionZeroValueRemoteOutput(net *lntest.NetworkHarness
68246827
t.Fatalf("unable to get carol chan info: %v", err)
68256828
}
68266829

6830+
// Disconnect Dave from Carol, so that upon Carol's restart he doesn't
6831+
// try to automatically reconnect and alert her of the changed state.
6832+
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
6833+
err = net.DisconnectNodes(ctxt, dave, carol)
6834+
if err != nil {
6835+
t.Fatalf("unable to disconnect dave and carol: %v", err)
6836+
}
6837+
68276838
// Now we shutdown Carol, copying over the his temporary database state
68286839
// which has the *prior* channel state over his current most up to date
68296840
// state. With this, we essentially force Carol to travel back in time

0 commit comments

Comments
 (0)