Skip to content

Commit

Permalink
Fixed missing return values
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Oct 3, 2020
1 parent ba0a355 commit 25c7ba7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions address.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])
}

Expand Down
4 changes: 2 additions & 2 deletions verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 25c7ba7

Please sign in to comment.