routing: add clock to router config

This commit is contained in:
Joost Jager committed 2020-03-09 11:43:44 +01:00
1 parent c357511051
commit 8558534417
3 files changed
+10 -2

No files matched your search

+3
View File
@@ -19,6 +19,7 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/clock"
"github.com/lightningnetwork/lnd/htlcswitch"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/lnwire"
@@ -131,6 +132,7 @@ func createTestCtxFromGraphInstance(startingHeight uint32, graphInstance *testGr
return next, nil
},
PathFindingConfig: pathFindingConfig,
Clock: clock.NewTestClock(time.Unix(1, 0)),
})
if err != nil {
return nil, nil, fmt.Errorf("unable to create router %v", err)
@@ -2967,6 +2969,7 @@ func TestRouterPaymentStateMachine(t *testing.T) {
next := atomic.AddUint64(&uniquePaymentID, 1)
return next, nil
},
Clock: clock.NewTestClock(time.Unix(1, 0)),
})
if err != nil {
t.Fatalf("unable to create router %v", err)