1fe07edbf9
* Problem: state transition code is duplicated Closes: #672 Solution: - move gas refund out from ApplyMessage - move check into ApplyMessage - move evm construction into ApplyMessage - ensure context stack is clean after ApplyMessage return fix unit tests undo rename add underflow check * improve performance - don't duplicate params loading - passing EVMConfig around as pointer
18 lines
398 B
Go
18 lines
398 B
Go
package types
|
|
|
|
import (
|
|
"math/big"
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
"github.com/ethereum/go-ethereum/params"
|
|
)
|
|
|
|
// EVMConfig encapulates common parameters needed to create an EVM to execute a message
|
|
// It's mainly to reduce the number of method parameters
|
|
type EVMConfig struct {
|
|
Params Params
|
|
ChainConfig *params.ChainConfig
|
|
CoinBase common.Address
|
|
BaseFee *big.Int
|
|
}
|