diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-04-07 16:03:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-07 16:03:11 +0800 |
commit | cc13d576f07fb6803e09fb42880591a67b8b0ef6 (patch) | |
tree | 6b2371c34416e3697443d836aab3a1f7fc32e77a /core/dao.go | |
parent | 71fdaa42386173da7bfa13f1728c394aeeb4eb01 (diff) | |
parent | 158d603528d2ba36b633a8f22a2bff8329f69717 (diff) | |
download | dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.gz dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.bz2 dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.lz dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.xz dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.zst dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.zip |
Merge pull request #13870 from karalabe/miners-fixes
all: clean up various error handling in core and the miner
Diffstat (limited to 'core/dao.go')
-rw-r--r-- | core/dao.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/dao.go b/core/dao.go index c43899e31..ff42a0e9d 100644 --- a/core/dao.go +++ b/core/dao.go @@ -18,6 +18,7 @@ package core import ( "bytes" + "fmt" "math/big" "github.com/ethereum/go-ethereum/core/state" @@ -46,11 +47,11 @@ func ValidateDAOHeaderExtraData(config *params.ChainConfig, header *types.Header // Depending whether we support or oppose the fork, validate the extra-data contents if config.DAOForkSupport { if !bytes.Equal(header.Extra, params.DAOForkBlockExtra) { - return ValidationError("DAO pro-fork bad block extra-data: 0x%x", header.Extra) + return fmt.Errorf("DAO pro-fork bad block extra-data: 0x%x", header.Extra) } } else { if bytes.Equal(header.Extra, params.DAOForkBlockExtra) { - return ValidationError("DAO no-fork bad block extra-data: 0x%x", header.Extra) + return fmt.Errorf("DAO no-fork bad block extra-data: 0x%x", header.Extra) } } // All ok, header has the same extra-data we expect |