From 25c7ba7bbdf7afdb4201a81e0d7c451013eedfbf Mon Sep 17 00:00:00 2001 From: mrz1836 Date: Sat, 3 Oct 2020 10:59:03 -0400 Subject: [PATCH] Fixed missing return values --- address.go | 4 ++-- verify.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/address.go b/address.go index ce60d4d..4c5cc1e 100644 --- a/address.go +++ b/address.go @@ -23,10 +23,10 @@ type A25 [25]byte // the first four bytes of the slice.) func (a *A25) doubleSHA256() []byte { h := sha256.New() - h.Write(a[:21]) + _, _ = h.Write(a[:21]) d := h.Sum([]byte{}) h = sha256.New() - h.Write(d) + _, _ = h.Write(d) return h.Sum(d[:0]) } diff --git a/verify.go b/verify.go index c2a62e3..f145c91 100644 --- a/verify.go +++ b/verify.go @@ -95,11 +95,11 @@ func pubKeyToAddress(pubkeyXy2 secp256k1.XY, compressed bool, magic []byte) (byt pubkeyXy2.GetPublicKey(out) sha256H := sha256.New() sha256H.Reset() - sha256H.Write(out) + _, _ = sha256H.Write(out) pubHash1 := sha256H.Sum(nil) ripemd160H := ripemd160.New() ripemd160H.Reset() - ripemd160H.Write(pubHash1) + _, _ = ripemd160H.Write(pubHash1) pubHash2 := ripemd160H.Sum(nil) byteCopy = append(magic, pubHash2...) hash2 := sha256d(byteCopy)