routing: add block cache to BitcoindFilteredChainView
This commit adds the block cache to the BitcoindFilteredChainView struct and wraps its GetBlock function so that block cache is used.
This commit is contained in:
1 parent
106f93a1b4
commit
0193669ed8
3 files changed
+25
-4
No files matched your search
@@ -26,6 +26,7 @@ import (
|
||||
_ "github.com/btcsuite/btcwallet/walletdb/bdb" // Required to register the boltdb walletdb implementation.
|
||||
|
||||
"github.com/lightninglabs/neutrino"
|
||||
"github.com/lightningnetwork/lnd/blockcache"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/channeldb/kvdb"
|
||||
)
|
||||
@@ -844,7 +845,11 @@ var interfaceImpls = []struct {
|
||||
cleanUp2()
|
||||
}
|
||||
|
||||
chainView := NewBitcoindFilteredChainView(chainConn)
|
||||
blockCache := blockcache.NewBlockCache(10000)
|
||||
|
||||
chainView := NewBitcoindFilteredChainView(
|
||||
chainConn, blockCache,
|
||||
)
|
||||
|
||||
return cleanUp3, chainView, nil
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user