From b40a6f86ef9878c93a7d04564b511f19ee2678ba Mon Sep 17 00:00:00 2001 From: David Hill Date: Thu, 12 Feb 2015 16:10:08 -0500 Subject: [PATCH] blockchain: Just fetch the height We only care about the height, so just fetch the height instead of the entire block. --- blockchain/blocklocator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blockchain/blocklocator.go b/blockchain/blocklocator.go index 48de4e319..cf7d160fe 100644 --- a/blockchain/blocklocator.go +++ b/blockchain/blocklocator.go @@ -55,12 +55,12 @@ func (b *BlockChain) BlockLocatorFromHash(hash *wire.ShaHash) BlockLocator { // Try to look up the height for passed block hash. Assume an // error means it doesn't exist and just return the locator for // the block itself. - block, err := b.db.FetchBlockBySha(hash) + height, err := b.db.FetchBlockHeightBySha(hash) if err != nil { return locator } - blockHeight = block.Height() + blockHeight = height } else { blockHeight = node.height