From 258019eb242eb027b7ccefb0403b204c3e5410f2 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Thu, 12 Jul 2018 17:41:12 -0700 Subject: [PATCH] htlcswitch/switch_test: update reverted test to use... current initialization methods --- htlcswitch/switch_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htlcswitch/switch_test.go b/htlcswitch/switch_test.go index 5b37c448..ca607e82 100644 --- a/htlcswitch/switch_test.go +++ b/htlcswitch/switch_test.go @@ -31,12 +31,12 @@ func genPreimage() ([32]byte, error) { func TestSwitchAddDuplicateLink(t *testing.T) { t.Parallel() - alicePeer, err := newMockServer(t, "alice", nil) + alicePeer, err := newMockServer(t, "alice", testStartingHeight, nil, 6) if err != nil { t.Fatalf("unable to create alice server: %v", err) } - s, err := initSwitchWithDB(nil) + s, err := initSwitchWithDB(testStartingHeight, nil) if err != nil { t.Fatalf("unable to init switch: %v", err) } @@ -74,9 +74,7 @@ func TestSwitchAddDuplicateLink(t *testing.T) { } // Remove the live link to ensure the indexes are cleared. - if err := s.RemoveLink(chanID1); err != nil { - t.Fatalf("unable to remove alice link: %v", err) - } + s.RemoveLink(chanID1) // Alice has no links, adding should succeed. if err := s.AddLink(aliceChannelLink); err != nil {