lnwallet: add height hint cache to backend tests

This commit is contained in:
Wilmer Paulino committed 2018-08-21 13:02:15 -04:00
1 parent 4c2a0970b4
commit 2931b2d3b2
1 file changed
+13 -1
+13 -1
View File
@@ -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)
}