multi: add GetBlockHeader to BlockChainIO
This commit is contained in:
7 files changed
+61
No files matched your search
@@ -149,6 +149,15 @@ func (b *BtcWallet) GetBlock(blockHash *chainhash.Hash) (*wire.MsgBlock, error)
|
||||
return b.chain.GetBlock(blockHash)
|
||||
}
|
||||
|
||||
// GetBlockHeader returns a block header for the block with the given hash.
|
||||
//
|
||||
// This method is a part of the lnwallet.BlockChainIO interface.
|
||||
func (b *BtcWallet) GetBlockHeader(
|
||||
blockHash *chainhash.Hash) (*wire.BlockHeader, error) {
|
||||
|
||||
return b.chain.GetBlockHeader(blockHash)
|
||||
}
|
||||
|
||||
// GetBlockHash returns the hash of the block in the best blockchain at the
|
||||
// given height.
|
||||
//
|
||||
|
||||
@@ -562,6 +562,9 @@ type BlockChainIO interface {
|
||||
// GetBlock returns the block in the main chain identified by the given
|
||||
// hash.
|
||||
GetBlock(blockHash *chainhash.Hash) (*wire.MsgBlock, error)
|
||||
|
||||
// GetBlockHeader returns the block header for the given block hash.
|
||||
GetBlockHeader(blockHash *chainhash.Hash) (*wire.BlockHeader, error)
|
||||
}
|
||||
|
||||
// MessageSigner represents an abstract object capable of signing arbitrary
|
||||
|
||||
@@ -364,3 +364,9 @@ func (*mockChainIO) GetBlock(blockHash *chainhash.Hash) (*wire.MsgBlock,
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (*mockChainIO) GetBlockHeader(
|
||||
blockHash *chainhash.Hash) (*wire.BlockHeader, error) {
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
Reference in new issue
Block a user