test_utils: init switch with default fwd/log tickers

This commit is contained in:
Conner Fromknecht 2018-07-31 21:01:45 -07:00
parent d5d01dd575
commit 8cc4681201
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

View File

@ -22,6 +22,7 @@ import (
"github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/shachain" "github.com/lightningnetwork/lnd/shachain"
"github.com/lightningnetwork/lnd/ticker"
) )
var ( var (
@ -351,6 +352,10 @@ func createTestPeer(notifier chainntnfs.ChainNotifier,
DB: dbAlice, DB: dbAlice,
SwitchPackager: channeldb.NewSwitchPackager(), SwitchPackager: channeldb.NewSwitchPackager(),
Notifier: notifier, Notifier: notifier,
FwdEventTicker: ticker.New(
htlcswitch.DefaultFwdEventInterval),
LogEventTicker: ticker.New(
htlcswitch.DefaultLogInterval),
}, uint32(currentHeight)) }, uint32(currentHeight))
if err != nil { if err != nil {
return nil, nil, nil, nil, err return nil, nil, nil, nil, err