aboutsummaryrefslogtreecommitdiffstats
path: root/core/dao.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/dao.go')
-rw-r--r--core/dao.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/dao.go b/core/dao.go
index 1260c310a..a7f544c3d 100644
--- a/core/dao.go
+++ b/core/dao.go
@@ -45,11 +45,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.Compare(header.Extra, params.DAOForkBlockExtra) != 0 {
+ if !bytes.Equal(header.Extra, params.DAOForkBlockExtra) {
return ValidationError("DAO pro-fork bad block extra-data: 0x%x", header.Extra)
}
} else {
- if bytes.Compare(header.Extra, params.DAOForkBlockExtra) == 0 {
+ if bytes.Equal(header.Extra, params.DAOForkBlockExtra) {
return ValidationError("DAO no-fork bad block extra-data: 0x%x", header.Extra)
}
}