|
8 | 8 | "encoding/json"
|
9 | 9 | "errors"
|
10 | 10 | "fmt"
|
| 11 | + "math/big" |
11 | 12 | "os"
|
12 | 13 | "path/filepath"
|
13 | 14 | "strings"
|
@@ -218,17 +219,6 @@ type VM struct {
|
218 | 219 | warpBackend warp.WarpBackend
|
219 | 220 | }
|
220 | 221 |
|
221 |
| -/* |
222 |
| - ****************************************************************************** |
223 |
| - ********************************* Snowman API ******************************** |
224 |
| - ****************************************************************************** |
225 |
| - */ |
226 |
| - |
227 |
| -// implements SnowmanPlusPlusVM interface |
228 |
| -func (vm *VM) GetActivationTime() time.Time { |
229 |
| - return time.Unix(vm.chainConfig.SubnetEVMTimestamp.Int64(), 0) |
230 |
| -} |
231 |
| - |
232 | 222 | // Initialize implements the snowman.ChainVM interface
|
233 | 223 | func (vm *VM) Initialize(
|
234 | 224 | _ context.Context,
|
@@ -390,6 +380,7 @@ func (vm *VM) Initialize(
|
390 | 380 | vm.chainConfig = g.Config
|
391 | 381 | vm.networkID = vm.ethConfig.NetworkId
|
392 | 382 |
|
| 383 | + // TODO: remove SkipSubnetEVMUpgradeCheck after next network upgrade |
393 | 384 | if !vm.config.SkipSubnetEVMUpgradeCheck {
|
394 | 385 | // check that subnetEVM upgrade is enabled from genesis before upgradeBytes
|
395 | 386 | if !vm.chainConfig.IsSubnetEVM(common.Big0) {
|
@@ -479,12 +470,11 @@ func (vm *VM) initializeChain(lastAcceptedHash common.Hash, ethConfig ethconfig.
|
479 | 470 | }
|
480 | 471 | vm.eth.SetEtherbase(ethConfig.Miner.Etherbase)
|
481 | 472 | vm.txPool = vm.eth.TxPool()
|
| 473 | + vm.txPool.SetMinFee(vm.chainConfig.FeeConfig.MinBaseFee) |
| 474 | + vm.txPool.SetGasPrice(big.NewInt(0)) |
482 | 475 | vm.blockChain = vm.eth.BlockChain()
|
483 | 476 | vm.miner = vm.eth.Miner()
|
484 | 477 |
|
485 |
| - // start goroutines to update the tx pool gas minimum gas price when upgrades go into effect |
486 |
| - vm.handleGasPriceUpdates() |
487 |
| - |
488 | 478 | vm.eth.Start()
|
489 | 479 | return vm.initChainState(vm.blockChain.LastAcceptedBlock())
|
490 | 480 | }
|
|
0 commit comments