diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2017-12-06 23:07:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-06 23:07:08 +0800 |
commit | e85b68ef53e80eb66c7ab394c57e9eb146a60b91 (patch) | |
tree | 92a728f14c9a0d42b50f2410d3c67a46795364d6 /crypto/crypto_test.go | |
parent | 6e613cf3de6ebfd14edd5a332baf6e4079c1c86f (diff) | |
download | dexon-e85b68ef53e80eb66c7ab394c57e9eb146a60b91.tar.gz dexon-e85b68ef53e80eb66c7ab394c57e9eb146a60b91.tar.zst dexon-e85b68ef53e80eb66c7ab394c57e9eb146a60b91.zip |
crypto: add DecompressPubkey, VerifySignature (#15615)
We need those operations for p2p/enr.
Also upgrade github.com/btcsuite/btcd/btcec to the latest version
and improve BenchmarkSha3. The benchmark printed extra output
that confused tools like benchstat and ignored N.
Diffstat (limited to 'crypto/crypto_test.go')
-rw-r--r-- | crypto/crypto_test.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index 92302948e..b4c441e5f 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -20,12 +20,10 @@ import ( "bytes" "crypto/ecdsa" "encoding/hex" - "fmt" "io/ioutil" "math/big" "os" "testing" - "time" "github.com/ethereum/go-ethereum/common" ) @@ -44,13 +42,9 @@ func TestKeccak256Hash(t *testing.T) { func BenchmarkSha3(b *testing.B) { a := []byte("hello world") - amount := 1000000 - start := time.Now() - for i := 0; i < amount; i++ { + for i := 0; i < b.N; i++ { Keccak256(a) } - - fmt.Println(amount, ":", time.Since(start)) } func TestSign(t *testing.T) { |