travis, build, consensus: drop support for Go 1.7

This commit is contained in:
Péter Szilágyi
2018-02-27 18:25:56 +02:00
parent b574b57766
commit 17b0e226d3
8 changed files with 64 additions and 169 deletions

View File

@@ -30,6 +30,22 @@ import (
"github.com/ethereum/go-ethereum/core/types"
)
// Tests whether the dataset size calculator works correctly by cross checking the
// hard coded lookup table with the value generated by it.
func TestSizeCalculations(t *testing.T) {
// Verify all the cache and dataset sizes from the lookup table.
for epoch, want := range cacheSizes {
if size := calcCacheSize(epoch); size != want {
t.Errorf("cache %d: cache size mismatch: have %d, want %d", epoch, size, want)
}
}
for epoch, want := range datasetSizes {
if size := calcDatasetSize(epoch); size != want {
t.Errorf("dataset %d: dataset size mismatch: have %d, want %d", epoch, size, want)
}
}
}
// Tests that verification caches can be correctly generated.
func TestCacheGeneration(t *testing.T) {
tests := []struct {