snapshots: bsc (#3382)

This commit is contained in:
Alex Sharov 2022-01-31 12:39:56 +07:00 committed by GitHub
parent 7b77585195
commit 94930c5fe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -19,6 +19,10 @@ var Mainnet = fromToml(mainnet)
var goerli []byte
var Goerli = fromToml(goerli)
//go:embed erigon-snapshots/bsc.toml
var bsc []byte
var Bsc = fromToml(bsc)
type Preverified map[string]string
func fromToml(in []byte) (out Preverified) {
@ -31,6 +35,7 @@ func fromToml(in []byte) (out Preverified) {
var (
MainnetChainSnapshotConfig = newConfig(Mainnet)
GoerliChainSnapshotConfig = newConfig(Goerli)
BscChainSnapshotConfig = newConfig(Bsc)
)
func newConfig(preverified Preverified) *Config {
@ -81,6 +86,8 @@ func KnownConfig(networkName string) *Config {
return MainnetChainSnapshotConfig
case networkname.GoerliChainName:
return GoerliChainSnapshotConfig
case networkname.BSCChainName:
return BscChainSnapshotConfig
default:
panic(fmt.Sprintf("snapshot sync not supported yet for network: %s", networkName))
}

@ -1 +1 @@
Subproject commit d0318c0c08649343c4ba9675fff3d4ec653b4c06
Subproject commit bcfbdf2e0cc28ffeacb14d9cb694af4442a3b110