From 7e83078d1385a9b68f562d1896d650550f11bc02 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 12 Dec 2019 17:58:34 +0300 Subject: [PATCH] hash: remove useless no-op decoding It changes nothing here. --- pkg/crypto/hash/hash.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/crypto/hash/hash.go b/pkg/crypto/hash/hash.go index af77d8f58..9be7f65ee 100644 --- a/pkg/crypto/hash/hash.go +++ b/pkg/crypto/hash/hash.go @@ -37,13 +37,10 @@ func RipeMD160(data []byte) util.Uint160 { // Hash160 performs sha256 and then ripemd160 // on the given data. func Hash160(data []byte) util.Uint160 { - var hash util.Uint160 - h1 := Sha256(data) h2 := RipeMD160(h1.BytesBE()) - hash, _ = util.Uint160DecodeBytesBE(h2.BytesBE()) - return hash + return h2 } // Checksum returns the checksum for a given piece of data