Update skip analysis (#1351)

This commit is contained in:
ledgerwatch 2020-11-13 08:35:14 +00:00 committed by GitHub
parent 15fdf93d6c
commit f55cb44001
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,10 @@ import (
"github.com/ledgerwatch/turbo-geth/params"
)
// This function tells us whether we can skip performing jumpdest analysis
// MainnetNotCheckedFrom is the first block number not yet checked for invalid jumps
const MainnetNotCheckedFrom uint64 = 11243897
// SkipAnalysis function tells us whether we can skip performing jumpdest analysis
// for the historical blocks (on mainnet now but perhaps on the testsnets
// in the future), because we have verified that there were only a few blocks
// where codeBitmap was useful. Invalid jumps either did not occur, or were
@ -30,9 +33,6 @@ import (
// 0x86e55d1818b5355424975de9633a57c40789ca08552297b726333a9433949c92 (block 6426298)
// 0x3666640316df11865abd1352f4c0b4c5126f8ac1d858ef2a0c6e744a4865bca2 (block 5800596)
// 0xcdb5bf0b4b51093e1c994f471921f88623c9d3e1b6aa2782049f53a0048f2b32 (block 11079912)
const MainnetNotCheckedFrom uint64 = 11196069
func SkipAnalysis(config *params.ChainConfig, blockNumber uint64) bool {
if config != params.MainnetChainConfig {
return false