lnwallet: add height hint cache to backend tests
This commit is contained in:
parent
4c2a0970b4
commit
2931b2d3b2
@ -2068,7 +2068,19 @@ func TestLightningWallet(t *testing.T) {
|
|||||||
|
|
||||||
rpcConfig := miningNode.RPCConfig()
|
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 {
|
if err != nil {
|
||||||
t.Fatalf("unable to create notifier: %v", err)
|
t.Fatalf("unable to create notifier: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user