erigon-pulse/cmd/rpcdaemon/commands/get_chain_config.go
Evgeny Danilenko e4f495fa44
Get logs (#1028)
* it compiles

* after recent master

* fix linters warnings

* grpcV7

* go mod tidy

* unmarshall adresses or adress

* fix linters

* after cr

* after cr

* after cr

* after cr

* fix tests

* remove dev version

* it compiles

* mod tidy

* fix bin deps

* use stable version of grpc

* switch back to master constructor

* switch back to master constructor

* add a bit docs

* add a bit docs

Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2020-09-03 08:51:19 +01: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)
}