aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-07-08 16:43:36 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-07-15 21:52:55 +0800
commit9e56811a3773e225bedf6bf0003327ea1aaae040 (patch)
tree7a7ef595447ca94c09ee48684116277dd90438c3 /core
parent6060e098c929792f455d7f580ed91e914d28cf3b (diff)
downloaddexon-9e56811a3773e225bedf6bf0003327ea1aaae040.tar.gz
dexon-9e56811a3773e225bedf6bf0003327ea1aaae040.tar.zst
dexon-9e56811a3773e225bedf6bf0003327ea1aaae040.zip
core: gracefully handle missing homestead block config
Diffstat (limited to 'core')
-rw-r--r--core/config.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/config.go b/core/config.go
index d557ae5a4..d04b00e9c 100644
--- a/core/config.go
+++ b/core/config.go
@@ -39,7 +39,7 @@ type ChainConfig struct {
// IsHomestead returns whether num is either equal to the homestead block or greater.
func (c *ChainConfig) IsHomestead(num *big.Int) bool {
- if num == nil {
+ if c.HomesteadBlock == nil || num == nil {
return false
}
return num.Cmp(c.HomesteadBlock) >= 0