Merge pull request #1278 from wpaulino/persistent-chain-notifiers

chainntnfs: introduce persistent height hint layer to ChainNotifier implementations
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2018-08-22 21:02:27 -07:00
commit c9bead7c21
17 files changed
+1410 -225

No files matched your search

+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)
}