mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
params: add nil-check before compare
This commit is contained in:
parent
03c5a021d8
commit
add868ce97
1 changed files with 3 additions and 0 deletions
|
|
@ -483,6 +483,9 @@ func (c *ChainConfig) IsForkBlock(n uint64) bool {
|
||||||
c.PetersburgBlock,
|
c.PetersburgBlock,
|
||||||
c.IstanbulBlock,
|
c.IstanbulBlock,
|
||||||
} {
|
} {
|
||||||
|
if forkNum == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
h := number.Cmp(forkNum)
|
h := number.Cmp(forkNum)
|
||||||
if h < 0 {
|
if h < 0 {
|
||||||
return false
|
return false
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue