mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 18:00:46 +00:00
fixed only three MNs making block when --XDC testnet flag enable
This commit is contained in:
parent
01583f3548
commit
ece14048a5
4 changed files with 13 additions and 1 deletions
|
|
@ -36,6 +36,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/ethereum/go-ethereum/params"
|
||||||
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
|
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
|
||||||
"github.com/naoina/toml"
|
"github.com/naoina/toml"
|
||||||
|
"github.com/ethereum/go-ethereum/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -151,6 +152,10 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, XDCConfig) {
|
||||||
ctx.Set(utils.NATFlag.Name, cfg.NAT)
|
ctx.Set(utils.NATFlag.Name, cfg.NAT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check testnet is enable.
|
||||||
|
if ctx.GlobalBool(utils.XDCTestnetFlag.Name) {
|
||||||
|
common.IsTestnet = true
|
||||||
|
}
|
||||||
// read passwords from enviroment
|
// read passwords from enviroment
|
||||||
passwords := []string{}
|
passwords := []string{}
|
||||||
for _, env := range cfg.Account.Passwords {
|
for _, env := range cfg.Account.Passwords {
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ var (
|
||||||
//utils.TestnetFlag,
|
//utils.TestnetFlag,
|
||||||
//utils.RinkebyFlag,
|
//utils.RinkebyFlag,
|
||||||
//utils.VMEnableDebugFlag,
|
//utils.VMEnableDebugFlag,
|
||||||
|
utils.XDCTestnetFlag,
|
||||||
utils.NetworkIdFlag,
|
utils.NetworkIdFlag,
|
||||||
utils.RPCCORSDomainFlag,
|
utils.RPCCORSDomainFlag,
|
||||||
utils.RPCVirtualHostsFlag,
|
utils.RPCVirtualHostsFlag,
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,10 @@ var (
|
||||||
Name: "testnet",
|
Name: "testnet",
|
||||||
Usage: "Ropsten network: pre-configured proof-of-work test network",
|
Usage: "Ropsten network: pre-configured proof-of-work test network",
|
||||||
}
|
}
|
||||||
|
XDCTestnetFlag = cli.BoolFlag{
|
||||||
|
Name: "XDC-testnet",
|
||||||
|
Usage: "XDC test network",
|
||||||
|
}
|
||||||
RinkebyFlag = cli.BoolFlag{
|
RinkebyFlag = cli.BoolFlag{
|
||||||
Name: "rinkeby",
|
Name: "rinkeby",
|
||||||
Usage: "Rinkeby network: pre-configured proof-of-authority test network",
|
Usage: "Rinkeby network: pre-configured proof-of-authority test network",
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,6 @@ const (
|
||||||
BlocksPerYear = uint64(15768000)
|
BlocksPerYear = uint64(15768000)
|
||||||
LimitThresholdNonceInQueue = 10
|
LimitThresholdNonceInQueue = 10
|
||||||
MinGasPrice = 2500
|
MinGasPrice = 2500
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var IsTestnet bool = false
|
||||||
Loading…
Reference in a new issue