mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
Merge pull request #420 from thanhnguyennguyen/using-gas-from-flag
Tomochain: Using gas from flag
This commit is contained in:
commit
cedec9f6f9
2 changed files with 10 additions and 1 deletions
|
|
@ -162,6 +162,14 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, tomoConfig) {
|
||||||
common.RollbackHash = common.HexToHash(rollbackHash)
|
common.RollbackHash = common.HexToHash(rollbackHash)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check GasPrice
|
||||||
|
common.MinGasPrice = common.DefaultMinGasPrice
|
||||||
|
if ctx.GlobalIsSet(utils.GasPriceFlag.Name) {
|
||||||
|
if gasPrice := int64(ctx.GlobalInt(utils.GasPriceFlag.Name)); gasPrice > common.DefaultMinGasPrice {
|
||||||
|
common.MinGasPrice = gasPrice
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// read passwords from environment
|
// read passwords from environment
|
||||||
passwords := []string{}
|
passwords := []string{}
|
||||||
for _, env := range cfg.Account.Passwords {
|
for _, env := range cfg.Account.Passwords {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const (
|
||||||
LimitPenaltyEpoch = 4
|
LimitPenaltyEpoch = 4
|
||||||
BlocksPerYear = uint64(15768000)
|
BlocksPerYear = uint64(15768000)
|
||||||
LimitThresholdNonceInQueue = 10
|
LimitThresholdNonceInQueue = 10
|
||||||
MinGasPrice = 2500
|
DefaultMinGasPrice = 2500
|
||||||
MergeSignRange = 15
|
MergeSignRange = 15
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -24,3 +24,4 @@ var TIP2019Block = big.NewInt(1050000)
|
||||||
var IsTestnet bool = false
|
var IsTestnet bool = false
|
||||||
var StoreRewardFolder string
|
var StoreRewardFolder string
|
||||||
var RollbackHash Hash
|
var RollbackHash Hash
|
||||||
|
var MinGasPrice int64
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue