erigon-pulse/cmd/rpcdaemon/commands/get_chain_config.go
2020-10-03 15:07:49 +07:00

12 lines
292 B
Go

package commands
import (
"github.com/ledgerwatch/turbo-geth/core/rawdb"
"github.com/ledgerwatch/turbo-geth/params"
)
func getChainConfig(db rawdb.DatabaseReader) *params.ChainConfig {
genesisHash := rawdb.ReadBlockByNumber(db, 0).Hash()
return rawdb.ReadChainConfig(db, genesisHash)
}