erigon-pulse/consensus/aura/consensusconfig/embed.go

25 lines
388 B
Go
Raw Normal View History

package consensusconfig
import (
_ "embed"
"github.com/ledgerwatch/erigon/params/networkname"
)
//go:embed poasokol.json
var Sokol []byte
2021-09-27 12:56:17 +00:00
//go:embed poagnosis.json
var Gnosis []byte
2021-09-27 12:56:17 +00:00
func GetConfigByChain(chainName string) []byte {
switch chainName {
case networkname.SokolChainName:
2021-09-27 12:56:17 +00:00
return Sokol
case networkname.GnosisChainName:
return Gnosis
2021-09-27 12:56:17 +00:00
default:
return Sokol
}
}