aboutsummaryrefslogtreecommitdiffstats
path: root/pow/ethash_algo_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-03-06 21:00:20 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-03-09 22:50:14 +0800
commitdf72e20cc521b43092b9e3cc684836d4d673e126 (patch)
treef158ca0f28a404f1798133daeddb8af9b0bbe920 /pow/ethash_algo_test.go
parent023670f6bafcfed28c01857da215217a5dadfaa1 (diff)
downloaddexon-df72e20cc521b43092b9e3cc684836d4d673e126.tar
dexon-df72e20cc521b43092b9e3cc684836d4d673e126.tar.gz
dexon-df72e20cc521b43092b9e3cc684836d4d673e126.tar.bz2
dexon-df72e20cc521b43092b9e3cc684836d4d673e126.tar.lz
dexon-df72e20cc521b43092b9e3cc684836d4d673e126.tar.xz
dexon-df72e20cc521b43092b9e3cc684836d4d673e126.tar.zst
dexon-df72e20cc521b43092b9e3cc684836d4d673e126.zip
pow: only support prime calculations on Go 1.8 and above
Diffstat (limited to 'pow/ethash_algo_test.go')
-rw-r--r--pow/ethash_algo_test.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/pow/ethash_algo_test.go b/pow/ethash_algo_test.go
index 253ddfa72..32e115db9 100644
--- a/pow/ethash_algo_test.go
+++ b/pow/ethash_algo_test.go
@@ -23,31 +23,6 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
)
-// Tests whether the dataset size calculator work correctly by cross checking the
-// hard coded lookup table with the value generated by it.
-func TestSizeCalculations(t *testing.T) {
- var tests []uint64
-
- // Verify all the cache sizes from the lookup table
- defer func(sizes []uint64) { cacheSizes = sizes }(cacheSizes)
- tests, cacheSizes = cacheSizes, []uint64{}
-
- for i, test := range tests {
- if size := cacheSize(uint64(i*epochLength) + 1); size != test {
- t.Errorf("cache %d: cache size mismatch: have %d, want %d", i, size, test)
- }
- }
- // Verify all the dataset sizes from the lookup table
- defer func(sizes []uint64) { datasetSizes = sizes }(datasetSizes)
- tests, datasetSizes = datasetSizes, []uint64{}
-
- for i, test := range tests {
- if size := datasetSize(uint64(i*epochLength) + 1); size != test {
- t.Errorf("dataset %d: dataset size mismatch: have %d, want %d", i, size, test)
- }
- }
-}
-
// Tests that verification caches can be correctly generated.
func TestCacheGeneration(t *testing.T) {
tests := []struct {