mirror of https://github.com/ethereum/go-ethereum
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
406 B
24 lines
406 B
4 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"io/ioutil"
|
||
|
"os"
|
||
|
|
||
|
"github.com/ethereum/go-ethereum/tests/fuzzers/difficulty"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
if len(os.Args) != 2 {
|
||
|
fmt.Fprintf(os.Stderr, "Usage: debug <file>")
|
||
|
os.Exit(1)
|
||
|
}
|
||
|
crasher := os.Args[1]
|
||
|
data, err := ioutil.ReadFile(crasher)
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "error loading crasher %v: %v", crasher, err)
|
||
|
os.Exit(1)
|
||
|
}
|
||
|
difficulty.Fuzz(data)
|
||
|
}
|