From c46424272c70d237c8eff1ff80e6a81f3bbcc81a Mon Sep 17 00:00:00 2001 From: Minh Doan Date: Wed, 22 Aug 2018 14:55:32 -0700 Subject: [PATCH] clean up redundant code --- blockchain/block.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/blockchain/block.go b/blockchain/block.go index 48dea653c..1a086f172 100644 --- a/blockchain/block.go +++ b/blockchain/block.go @@ -60,18 +60,6 @@ func (b *Block) String() string { return res } -// HashTransactions returns a hash of the transactions in the block -func (b *Block) HashTransactions() []byte { - var txHashes [][]byte - var txHash [32]byte - - for _, tx := range b.Transactions { - txHashes = append(txHashes, tx.ID[:]) - } - txHash = sha256.Sum256(bytes.Join(txHashes, []byte{})) - return txHash[:] -} - func (b *Block) Write(db db.Database, key string) error { return db.Put([]byte(key), b.Serialize()) }