diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-04-06 19:58:03 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-04-06 22:34:19 +0800 |
commit | 158d603528d2ba36b633a8f22a2bff8329f69717 (patch) | |
tree | 7e95ceca2b57686e766182b6e6d14fe10704dcf8 /core/dao.go | |
parent | 702bef8493f0f3486072f1a7593fa582a1fb53d0 (diff) | |
download | dexon-158d603528d2ba36b633a8f22a2bff8329f69717.tar dexon-158d603528d2ba36b633a8f22a2bff8329f69717.tar.gz dexon-158d603528d2ba36b633a8f22a2bff8329f69717.tar.bz2 dexon-158d603528d2ba36b633a8f22a2bff8329f69717.tar.lz dexon-158d603528d2ba36b633a8f22a2bff8329f69717.tar.xz dexon-158d603528d2ba36b633a8f22a2bff8329f69717.tar.zst dexon-158d603528d2ba36b633a8f22a2bff8329f69717.zip |
consensus, core: drop all the legacy custom core error types
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 |