btcwallet: make blockcache available to BtcWallet
This commit makes the blockcache available to BtcWallet so that any GetBlock call made to BtcWallet is wrapped by the blockcache GetBlock call.
This commit is contained in:
1 parent
6702c79216
commit
106f93a1b4
5 files changed
+30
-8
No files matched your search
@@ -131,7 +131,7 @@ func (b *BtcWallet) GetUtxo(op *wire.OutPoint, pkScript []byte,
|
||||
//
|
||||
// This method is a part of the lnwallet.BlockChainIO interface.
|
||||
func (b *BtcWallet) GetBlock(blockHash *chainhash.Hash) (*wire.MsgBlock, error) {
|
||||
return b.chain.GetBlock(blockHash)
|
||||
return b.blockCache.GetBlock(blockHash, b.chain.GetBlock)
|
||||
}
|
||||
|
||||
// GetBlockHash returns the hash of the block in the best blockchain at the
|
||||
|
||||
Reference in new issue
Block a user