|
|
@ -276,6 +276,36 @@ var ( |
|
|
|
Usage: "solidity compiler to be used", |
|
|
|
Usage: "solidity compiler to be used", |
|
|
|
Value: "solc", |
|
|
|
Value: "solc", |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
GpoMinGasPriceFlag = cli.StringFlag{ |
|
|
|
|
|
|
|
Name: "gpomin", |
|
|
|
|
|
|
|
Usage: "Minimum suggested gas price", |
|
|
|
|
|
|
|
Value: new(big.Int).Mul(big.NewInt(10), common.Szabo).String(), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
GpoMaxGasPriceFlag = cli.StringFlag{ |
|
|
|
|
|
|
|
Name: "gpomax", |
|
|
|
|
|
|
|
Usage: "Maximum suggested gas price", |
|
|
|
|
|
|
|
Value: new(big.Int).Mul(big.NewInt(1000), common.Szabo).String(), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
GpoFullBlockRatioFlag = cli.IntFlag{ |
|
|
|
|
|
|
|
Name: "gpofull", |
|
|
|
|
|
|
|
Usage: "Full block threshold for gas price calculation (%)", |
|
|
|
|
|
|
|
Value: 80, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
GpobaseStepDownFlag = cli.IntFlag{ |
|
|
|
|
|
|
|
Name: "gpobasedown", |
|
|
|
|
|
|
|
Usage: "Suggested gas price base step down ratio (1/1000)", |
|
|
|
|
|
|
|
Value: 10, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
GpobaseStepUpFlag = cli.IntFlag{ |
|
|
|
|
|
|
|
Name: "gpobaseup", |
|
|
|
|
|
|
|
Usage: "Suggested gas price base step up ratio (1/1000)", |
|
|
|
|
|
|
|
Value: 100, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
GpobaseCorrectionFactorFlag = cli.IntFlag{ |
|
|
|
|
|
|
|
Name: "gpobasecf", |
|
|
|
|
|
|
|
Usage: "Suggested gas price base correction factor (%)", |
|
|
|
|
|
|
|
Value: 110, |
|
|
|
|
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
// MakeNAT creates a port mapper from set command line flags.
|
|
|
|
// MakeNAT creates a port mapper from set command line flags.
|
|
|
@ -313,33 +343,39 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { |
|
|
|
clientID += "/" + customName |
|
|
|
clientID += "/" + customName |
|
|
|
} |
|
|
|
} |
|
|
|
return ð.Config{ |
|
|
|
return ð.Config{ |
|
|
|
Name: common.MakeName(clientID, version), |
|
|
|
Name: common.MakeName(clientID, version), |
|
|
|
DataDir: ctx.GlobalString(DataDirFlag.Name), |
|
|
|
DataDir: ctx.GlobalString(DataDirFlag.Name), |
|
|
|
ProtocolVersion: ctx.GlobalInt(ProtocolVersionFlag.Name), |
|
|
|
ProtocolVersion: ctx.GlobalInt(ProtocolVersionFlag.Name), |
|
|
|
GenesisNonce: ctx.GlobalInt(GenesisNonceFlag.Name), |
|
|
|
GenesisNonce: ctx.GlobalInt(GenesisNonceFlag.Name), |
|
|
|
BlockChainVersion: ctx.GlobalInt(BlockchainVersionFlag.Name), |
|
|
|
BlockChainVersion: ctx.GlobalInt(BlockchainVersionFlag.Name), |
|
|
|
SkipBcVersionCheck: false, |
|
|
|
SkipBcVersionCheck: false, |
|
|
|
NetworkId: ctx.GlobalInt(NetworkIdFlag.Name), |
|
|
|
NetworkId: ctx.GlobalInt(NetworkIdFlag.Name), |
|
|
|
LogFile: ctx.GlobalString(LogFileFlag.Name), |
|
|
|
LogFile: ctx.GlobalString(LogFileFlag.Name), |
|
|
|
Verbosity: ctx.GlobalInt(VerbosityFlag.Name), |
|
|
|
Verbosity: ctx.GlobalInt(VerbosityFlag.Name), |
|
|
|
LogJSON: ctx.GlobalString(LogJSONFlag.Name), |
|
|
|
LogJSON: ctx.GlobalString(LogJSONFlag.Name), |
|
|
|
Etherbase: ctx.GlobalString(EtherbaseFlag.Name), |
|
|
|
Etherbase: ctx.GlobalString(EtherbaseFlag.Name), |
|
|
|
MinerThreads: ctx.GlobalInt(MinerThreadsFlag.Name), |
|
|
|
MinerThreads: ctx.GlobalInt(MinerThreadsFlag.Name), |
|
|
|
AccountManager: MakeAccountManager(ctx), |
|
|
|
AccountManager: MakeAccountManager(ctx), |
|
|
|
VmDebug: ctx.GlobalBool(VMDebugFlag.Name), |
|
|
|
VmDebug: ctx.GlobalBool(VMDebugFlag.Name), |
|
|
|
MaxPeers: ctx.GlobalInt(MaxPeersFlag.Name), |
|
|
|
MaxPeers: ctx.GlobalInt(MaxPeersFlag.Name), |
|
|
|
MaxPendingPeers: ctx.GlobalInt(MaxPendingPeersFlag.Name), |
|
|
|
MaxPendingPeers: ctx.GlobalInt(MaxPendingPeersFlag.Name), |
|
|
|
Port: ctx.GlobalString(ListenPortFlag.Name), |
|
|
|
Port: ctx.GlobalString(ListenPortFlag.Name), |
|
|
|
NAT: MakeNAT(ctx), |
|
|
|
NAT: MakeNAT(ctx), |
|
|
|
NatSpec: ctx.GlobalBool(NatspecEnabledFlag.Name), |
|
|
|
NatSpec: ctx.GlobalBool(NatspecEnabledFlag.Name), |
|
|
|
Discovery: !ctx.GlobalBool(NoDiscoverFlag.Name), |
|
|
|
Discovery: !ctx.GlobalBool(NoDiscoverFlag.Name), |
|
|
|
NodeKey: MakeNodeKey(ctx), |
|
|
|
NodeKey: MakeNodeKey(ctx), |
|
|
|
Shh: ctx.GlobalBool(WhisperEnabledFlag.Name), |
|
|
|
Shh: ctx.GlobalBool(WhisperEnabledFlag.Name), |
|
|
|
Dial: true, |
|
|
|
Dial: true, |
|
|
|
BootNodes: ctx.GlobalString(BootnodesFlag.Name), |
|
|
|
BootNodes: ctx.GlobalString(BootnodesFlag.Name), |
|
|
|
GasPrice: common.String2Big(ctx.GlobalString(GasPriceFlag.Name)), |
|
|
|
GasPrice: common.String2Big(ctx.GlobalString(GasPriceFlag.Name)), |
|
|
|
SolcPath: ctx.GlobalString(SolcPathFlag.Name), |
|
|
|
GpoMinGasPrice: common.String2Big(ctx.GlobalString(GpoMinGasPriceFlag.Name)), |
|
|
|
AutoDAG: ctx.GlobalBool(AutoDAGFlag.Name) || ctx.GlobalBool(MiningEnabledFlag.Name), |
|
|
|
GpoMaxGasPrice: common.String2Big(ctx.GlobalString(GpoMaxGasPriceFlag.Name)), |
|
|
|
|
|
|
|
GpoFullBlockRatio: ctx.GlobalInt(GpoFullBlockRatioFlag.Name), |
|
|
|
|
|
|
|
GpobaseStepDown: ctx.GlobalInt(GpobaseStepDownFlag.Name), |
|
|
|
|
|
|
|
GpobaseStepUp: ctx.GlobalInt(GpobaseStepUpFlag.Name), |
|
|
|
|
|
|
|
GpobaseCorrectionFactor: ctx.GlobalInt(GpobaseCorrectionFactorFlag.Name), |
|
|
|
|
|
|
|
SolcPath: ctx.GlobalString(SolcPathFlag.Name), |
|
|
|
|
|
|
|
AutoDAG: ctx.GlobalBool(AutoDAGFlag.Name) || ctx.GlobalBool(MiningEnabledFlag.Name), |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|