test_utils: init switch with channeldb

This commit is contained in:
Conner Fromknecht 2018-01-17 17:15:41 -08:00
parent 935c757102
commit 4f5edc1b2e
No known key found for this signature in database
GPG Key ID: 39DE78FBE6ACB0EF
1 changed files with 7 additions and 1 deletions

View File

@ -291,7 +291,13 @@ func createTestPeer(notifier chainntnfs.ChainNotifier,
breachArbiter: breachArbiter,
chainArb: chainArb,
}
s.htlcSwitch = htlcswitch.New(htlcswitch.Config{})
htlcSwitch, err := htlcswitch.New(htlcswitch.Config{
DB: dbAlice,
})
if err != nil {
return nil, nil, nil, nil, err
}
s.htlcSwitch = htlcSwitch
s.htlcSwitch.Start()
alicePeer := &peer{