core, miner, tests: added test, implemented bad block reporting

This commit is contained in:
Jeffrey Wilcke
2015-07-04 17:45:18 +02:00
parent 9c3db1be1d
commit bcc1660abc
4 changed files with 61 additions and 2 deletions

View File

@ -8,6 +8,8 @@ import (
"net/http"
"os"
"path/filepath"
"github.com/ethereum/go-ethereum/core"
)
var (
@ -48,6 +50,7 @@ func readJson(reader io.Reader, value interface{}) error {
return fmt.Errorf("Error reading JSON file", err.Error())
}
core.DisableBadBlockReporting = true
if err = json.Unmarshal(data, &value); err != nil {
if syntaxerr, ok := err.(*json.SyntaxError); ok {
line := findLine(data, syntaxerr.Offset)