Merge pull request #1400 from obscuren/badblock-reporting

core, miner, tests: added test, implemented bad block reporting
This commit is contained in:
Jeffrey Wilcke
2015-07-06 02:03:50 -07:00
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 (
@ -43,6 +45,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)