diff --git a/coinset/coins_test.go b/coinset/coins_test.go index ec61eb2..d8ca496 100644 --- a/coinset/coins_test.go +++ b/coinset/coins_test.go @@ -6,6 +6,7 @@ package coinset_test import ( "bytes" + "crypto/sha256" "encoding/hex" "fmt" "testing" @@ -14,7 +15,6 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/coinset" - "github.com/btcsuite/fastsha256" ) type TestCoin struct { @@ -32,7 +32,7 @@ func (c *TestCoin) NumConfs() int64 { return c.TxNumConfs } func (c *TestCoin) ValueAge() int64 { return int64(c.TxValue) * c.TxNumConfs } func NewCoin(index int64, value btcutil.Amount, numConfs int64) coinset.Coin { - h := fastsha256.New() + h := sha256.New() h.Write([]byte(fmt.Sprintf("%d", index))) hash, _ := chainhash.NewHash(h.Sum(nil)) c := &TestCoin{ diff --git a/hash160.go b/hash160.go index bc78841..0e58219 100644 --- a/hash160.go +++ b/hash160.go @@ -5,9 +5,9 @@ package btcutil import ( + "crypto/sha256" "hash" - "github.com/btcsuite/fastsha256" "github.com/btcsuite/golangcrypto/ripemd160" ) @@ -19,5 +19,5 @@ func calcHash(buf []byte, hasher hash.Hash) []byte { // Hash160 calculates the hash ripemd160(sha256(b)). func Hash160(buf []byte) []byte { - return calcHash(calcHash(buf, fastsha256.New()), ripemd160.New()) + return calcHash(calcHash(buf, sha256.New()), ripemd160.New()) }