From f2da6581ba827a2aab091f764ace8017b26450d8 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 6 Jan 2017 16:44:20 +0100 Subject: all: fix issues reported by honnef.co/go/simple/cmd/gosimple --- core/dao.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/dao.go') 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) } } -- cgit v1.2.3