core/state: remove unused function xTestFuzzCutter

This commit is contained in:
Felix Lange 2019-11-15 12:07:13 +01:00
parent d78a095e41
commit 8d3ef0924a

View file

@ -18,10 +18,7 @@ package state
import ( import (
"bytes" "bytes"
"fmt"
"math/rand"
"testing" "testing"
"time"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
) )
@ -47,22 +44,3 @@ func BenchmarkCutCustomTrim(b *testing.B) {
common.TrimLeftZeroes(value[:]) common.TrimLeftZeroes(value[:])
} }
} }
func xTestFuzzCutter(t *testing.T) {
rand.Seed(time.Now().Unix())
for {
v := make([]byte, 20)
zeroes := rand.Intn(21)
rand.Read(v[zeroes:])
exp := bytes.TrimLeft(v[:], "\x00")
got := common.TrimLeftZeroes(v)
if !bytes.Equal(exp, got) {
fmt.Printf("Input %x\n", v)
fmt.Printf("Exp %x\n", exp)
fmt.Printf("Got %x\n", got)
t.Fatalf("Error")
}
//break
}
}