Update for recent wire API hash error changes.

This commit is contained in:
Dave Collins 2015-04-17 01:13:21 -05:00
parent e330838900
commit 9556412b01
2 changed files with 2 additions and 8 deletions

View file

@ -76,11 +76,8 @@ func (b *Block) Sha() *wire.ShaHash {
return b.blockSha 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. // Cache the block hash and return it.
sha := b.msgBlock.BlockSha()
b.blockSha = &sha b.blockSha = &sha
return &sha return &sha
} }

5
tx.go
View file

@ -41,11 +41,8 @@ func (t *Tx) Sha() *wire.ShaHash {
return t.txSha 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. // Cache the hash and return it.
sha := t.msgTx.TxSha()
t.txSha = &sha t.txSha = &sha
return &sha return &sha
} }