Merge pull request #3487 from matheusd/lnd-fix-extra-dave

itest: Shutdown final Dave node in testChanRestore
This commit is contained in:
Johan T. Halseth 2019-09-12 14:55:53 +02:00 committed by GitHub
commit 01f696afce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13413,7 +13413,11 @@ func testChanRestoreScenario(t *harnessTest, net *lntest.NetworkHarness,
if err != nil {
t.Fatalf("unable to create new node: %v", err)
}
defer shutdownAndAssert(net, t, dave)
// Defer to a closure instead of to shutdownAndAssert due to the value
// of 'dave' changing throughout the test.
defer func() {
shutdownAndAssert(net, t, dave)
}()
carol, err := net.NewNode("carol", nil)
if err != nil {
t.Fatalf("unable to make new node: %v", err)