mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
check difficulty for nil (#7978)
Fix checks `chainConfig.TerminalTotalDifficulty` for nil in `isChainPoS`. Not doing so causes the Bor startup flow to panic.
This commit is contained in:
parent
6081fe01b8
commit
6bd58f7c39
@ -1255,5 +1255,7 @@ func isChainPoS(chainConfig *chain.Config, currentTD *big.Int) bool {
|
||||
id == 5 ||
|
||||
id == 11155111 ||
|
||||
id == 100 ||
|
||||
id == 10200 || chainConfig.TerminalTotalDifficulty.Cmp(currentTD) <= 0 || chainConfig.TerminalTotalDifficultyPassed
|
||||
id == 10200 ||
|
||||
(chainConfig.TerminalTotalDifficulty != nil && chainConfig.TerminalTotalDifficulty.Cmp(currentTD) <= 0) ||
|
||||
chainConfig.TerminalTotalDifficultyPassed
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user