fixed only three MNs making block when --XDC testnet flag enable

This commit is contained in:
parmarrushabh 2018-11-17 17:10:09 +05:30
parent 01583f3548
commit ece14048a5
4 changed files with 13 additions and 1 deletions

View file

@ -36,6 +36,7 @@ import (
"github.com/ethereum/go-ethereum/params"
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
"github.com/naoina/toml"
"github.com/ethereum/go-ethereum/common"
)
var (
@ -151,6 +152,10 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, XDCConfig) {
ctx.Set(utils.NATFlag.Name, cfg.NAT)
}
// Check testnet is enable.
if ctx.GlobalBool(utils.XDCTestnetFlag.Name) {
common.IsTestnet = true
}
// read passwords from enviroment
passwords := []string{}
for _, env := range cfg.Account.Passwords {

View file

@ -109,6 +109,7 @@ var (
//utils.TestnetFlag,
//utils.RinkebyFlag,
//utils.VMEnableDebugFlag,
utils.XDCTestnetFlag,
utils.NetworkIdFlag,
utils.RPCCORSDomainFlag,
utils.RPCVirtualHostsFlag,

View file

@ -137,6 +137,10 @@ var (
Name: "testnet",
Usage: "Ropsten network: pre-configured proof-of-work test network",
}
XDCTestnetFlag = cli.BoolFlag{
Name: "XDC-testnet",
Usage: "XDC test network",
}
RinkebyFlag = cli.BoolFlag{
Name: "rinkeby",
Usage: "Rinkeby network: pre-configured proof-of-authority test network",

View file

@ -15,4 +15,6 @@ const (
BlocksPerYear = uint64(15768000)
LimitThresholdNonceInQueue = 10
MinGasPrice = 2500
)
)
var IsTestnet bool = false