lnwallet: add height hint cache to backend tests

This commit is contained in:
Wilmer Paulino 2018-05-22 15:49:38 -04:00
parent 4c2a0970b4
commit 2931b2d3b2
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F

@ -2068,7 +2068,19 @@ func TestLightningWallet(t *testing.T) {
rpcConfig := miningNode.RPCConfig()
chainNotifier, err := btcdnotify.New(&rpcConfig)
tempDir, err := ioutil.TempDir("", "channeldb")
if err != nil {
t.Fatalf("unable to create temp dir: %v", err)
}
db, err := channeldb.Open(tempDir)
if err != nil {
t.Fatalf("unable to create db: %v", err)
}
hintCache, err := chainntnfs.NewHeightHintCache(db)
if err != nil {
t.Fatalf("unable to create height hint cache: %v", err)
}
chainNotifier, err := btcdnotify.New(&rpcConfig, hintCache, hintCache)
if err != nil {
t.Fatalf("unable to create notifier: %v", err)
}