Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
core/fork: >= was missing
Browse files Browse the repository at this point in the history
  • Loading branch information
gravity committed Aug 29, 2016
1 parent 22d2a2c commit f8ca00d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (

"github.com/ethereumproject/go-ethereum/common"
"github.com/ethereumproject/go-ethereum/core/types"
"github.com/ethereumproject/go-ethereum/logger"
"github.com/ethereumproject/go-ethereum/logger/glog"
)

type Fork struct {
Expand All @@ -29,6 +31,7 @@ type Fork struct {
}

func (fork *Fork) ValidateForkHeaderExtraData(header *types.Header) error {
glog.V(logger.Info).Infof("validate fork header extra data")
// Short circuit validation if the node doesn't care about the DAO fork
if fork.Block == nil {
return nil
Expand All @@ -44,6 +47,7 @@ func (fork *Fork) ValidateForkHeaderExtraData(header *types.Header) error {
return ValidationError("Fork bad block extra-data: 0x%x", header.Extra)
}
} else {
glog.V(logger.Info).Infof("Dont support during validation")
if bytes.Compare(header.Extra, fork.BlockExtra) == 0 {
return ValidationError("No-fork bad block extra-data: 0x%x", header.Extra)
}
Expand Down

0 comments on commit f8ca00d

Please sign in to comment.