aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/vm.go
diff options
context:
space:
mode:
authorTyler Smith <tylersmith.me@gmail.com>2020-07-30 22:00:38 -0700
committerTyler Smith <tylersmith.me@gmail.com>2020-08-12 03:07:00 -0700
commit14fe03cbfecf508848bcd1172ea8d2ee3e41fda4 (patch)
tree6282fdea776271c1c141c5ca8560846dbea60252 /plugin/evm/vm.go
parent1bb314f767785fe617c3c5efeca1a64127339506 (diff)
TWEAK: Set minimum gas price.
Diffstat (limited to 'plugin/evm/vm.go')
-rw-r--r--plugin/evm/vm.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go
index cf5ef8a..7b4d064 100644
--- a/plugin/evm/vm.go
+++ b/plugin/evm/vm.go
@@ -60,6 +60,10 @@ const (
)
var (
+ // minGasPrice is the number of nAVAX required per gas unit for a transaction
+ // to be valid
+ minGasPrice = big.NewInt(85)
+
errEmptyBlock = errors.New("empty block")
errCreateBlock = errors.New("couldn't create block")
errUnknownBlock = errors.New("unknown block")
@@ -140,6 +144,12 @@ func (vm *VM) Initialize(
config.Genesis = g
config.Miner.ManualMining = true
config.Miner.DisableUncle = true
+
+ // Set minimum price for mining and default gas price oracle value to the min
+ // gas price to prevent so transactions and blocks all use the correct fees
+ config.Miner.GasPrice = minGasPrice
+ config.GPO.Default = minGasPrice
+
if err := config.SetGCMode("archive"); err != nil {
panic(err)
}