change: mumbai to bor-mumbai

This commit is contained in:
Krishna Upadhyaya 2021-09-21 14:58:11 +05:30
parent 0c4366ea6a
commit 00b5788793
7 changed files with 12 additions and 16 deletions

View file

@ -235,7 +235,7 @@ func ethFilter(args []string) (nodeFilter, error) {
filter = forkid.NewStaticFilter(params.GoerliChainConfig, params.GoerliGenesisHash)
case "ropsten":
filter = forkid.NewStaticFilter(params.RopstenChainConfig, params.RopstenGenesisHash)
case "mumbai":
case "bor-mumbai":
filter = forkid.NewStaticFilter(params.MumbaiChainConfig, params.MumbaiGenesisHash)
case "bor-mainnet":
filter = forkid.NewStaticFilter(params.BorMainnetChainConfig, params.BorMainnetGenesisHash)

View file

@ -88,7 +88,7 @@ var (
goerliFlag = flag.Bool("goerli", false, "Initializes the faucet with Görli network config")
rinkebyFlag = flag.Bool("rinkeby", false, "Initializes the faucet with Rinkeby network config")
mumbaiFlag = flag.Bool("mumbai", false, "Initializes the faucet with Mumbai network config")
mumbaiFlag = flag.Bool("bor-mumbai", false, "Initializes the faucet with Bor-Mumbai network config")
)
var (

View file

@ -297,7 +297,7 @@ func prepare(ctx *cli.Context) {
log.Info("Starting Geth on Ethereum mainnet...")
}
// If we're a full node on mainnet without --cache specified, bump default cache allowance
if ctx.GlobalString(utils.SyncModeFlag.Name) != "light" && !ctx.GlobalIsSet(utils.CacheFlag.Name) && !ctx.GlobalIsSet(utils.BorMainnetFlag.Name) && !ctx.GlobalIsSet(utils.NetworkIdFlag.Name) {
if ctx.GlobalString(utils.SyncModeFlag.Name) != "light" && !ctx.GlobalIsSet(utils.CacheFlag.Name) && !ctx.GlobalIsSet(utils.NetworkIdFlag.Name) {
// Make sure we're not on any supported preconfigured testnet either
if !ctx.GlobalIsSet(utils.RopstenFlag.Name) && !ctx.GlobalIsSet(utils.RinkebyFlag.Name) && !ctx.GlobalIsSet(utils.GoerliFlag.Name) && !ctx.GlobalIsSet(utils.MumbaiFlag.Name) && !ctx.GlobalIsSet(utils.DeveloperFlag.Name) {
// Nope, we're really on mainnet. Bump that cache up!

View file

@ -156,7 +156,7 @@ var (
Usage: "Ropsten network: pre-configured proof-of-work test network",
}
MumbaiFlag = cli.BoolFlag{
Name: "mumbai",
Name: "bor-mumbai",
Usage: "Mumbai network: pre-configured proof-of-stake test network",
}
BorMainnetFlag = cli.BoolFlag{
@ -805,7 +805,7 @@ func MakeDataDir(ctx *cli.Context) string {
if ctx.GlobalBool(GoerliFlag.Name) {
return filepath.Join(path, "goerli")
}
if ctx.GlobalBool(MumbaiFlag.Name) {
if ctx.GlobalBool(MumbaiFlag.Name) || ctx.GlobalBool(BorMainnetFlag.Name) {
homeDir, _ := os.UserHomeDir()
return filepath.Join(homeDir, "/.bor/data")
}

View file

@ -423,16 +423,13 @@ func DefaultMumbaiGenesisBlock() *Genesis {
func DefaultBorMainnetGenesisBlock() *Genesis {
return &Genesis{
Config: params.BorMainnetChainConfig,
Nonce: 0x0,
Timestamp: 0x5ED20F84,
GasLimit: 0x989680,
Nonce: 0,
Timestamp: 1590824836,
GasLimit: 10000000,
Difficulty: big.NewInt(1),
Mixhash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
Coinbase: common.HexToAddress("0x0000000000000000000000000000000000000000"),
Alloc: readPrealloc("allocs/bor_mainnet.json"),
Number: 0x0,
GasUsed: 0x0,
ParentHash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
}
}

View file

@ -246,10 +246,7 @@ func Setup(ctx *cli.Context) error {
// This context value ("metrics.addr") represents the utils.MetricsHTTPFlag.Name.
// It cannot be imported because it will cause a cyclical dependency.
StartPProf(address, !ctx.GlobalIsSet("metrics.addr"))
} else if ctx.GlobalIsSet("mumbai") {
address := fmt.Sprintf("%s:%d", "0.0.0.0", 7071)
StartPProf(address, !ctx.GlobalIsSet("metrics.addr"))
} else if ctx.GlobalIsSet("bor-mainnet") {
} else if ctx.GlobalIsSet("bor-mumbai") || ctx.GlobalIsSet("bor-mainnet") {
address := fmt.Sprintf("%s:%d", "0.0.0.0", 7071)
StartPProf(address, !ctx.GlobalIsSet("metrics.addr"))
}

View file

@ -251,8 +251,10 @@ var (
BorMainnetChainConfig = &ChainConfig{
ChainID: big.NewInt(137),
HomesteadBlock: big.NewInt(0),
EIP150Block: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
EIP150Hash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
EIP150Block: big.NewInt(0),
EIP155Block: big.NewInt(0),
EIP158Block: big.NewInt(0),
ByzantiumBlock: big.NewInt(0),