From 9556412b01d69fe1feffe1bddcdf456e47239790 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Fri, 17 Apr 2015 01:13:21 -0500 Subject: [PATCH] Update for recent wire API hash error changes. --- block.go | 5 +---- tx.go | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/block.go b/block.go index e836459..0703033 100644 --- a/block.go +++ b/block.go @@ -76,11 +76,8 @@ func (b *Block) Sha() *wire.ShaHash { return b.blockSha } - // Generate the block hash. Ignore the error since BlockSha can't - // currently fail. - sha, _ := b.msgBlock.BlockSha() - // Cache the block hash and return it. + sha := b.msgBlock.BlockSha() b.blockSha = &sha return &sha } diff --git a/tx.go b/tx.go index 8dda596..5b07aea 100644 --- a/tx.go +++ b/tx.go @@ -41,11 +41,8 @@ func (t *Tx) Sha() *wire.ShaHash { return t.txSha } - // Generate the transaction hash. Ignore the error since TxSha can't - // currently fail. - sha, _ := t.msgTx.TxSha() - // Cache the hash and return it. + sha := t.msgTx.TxSha() t.txSha = &sha return &sha }