chainntnfs: add block cache to BtcdNotifier

This commit adds gives BtcdNotifier access to the block cache and wraps
its GetBlock method so that it uses the block cache.
This commit is contained in:
Elle Mouton committed 2021-04-28 09:46:11 +02:00
1 parent 8a33fbf11a
commit a0f7bf8b2d
6 files changed
+40 -10

No files matched your search

+2 -1
View File
@@ -3205,8 +3205,9 @@ func TestLightningWallet(t *testing.T, targetBackEnd string) {
if err != nil {
t.Fatalf("unable to create height hint cache: %v", err)
}
blockCache := blockcache.NewBlockCache(10000)
chainNotifier, err := btcdnotify.New(
&rpcConfig, netParams, hintCache, hintCache,
&rpcConfig, netParams, hintCache, hintCache, blockCache,
)
if err != nil {
t.Fatalf("unable to create notifier: %v", err)