forked from cerc-io/plugeth
core/vm: set basefee to 0 internally on eth_call (#28470)
* core/vm: set basefee to 0 internally on eth_call * core: nicer 0-basefee, make it work for blob fees too * internal/ethapi: make tests a bit more complex * core: fix blob fee checker * core: make code a bit more readable * core: fix some test error strings * core/vm: Get rid of weird comment * core: dict wrong typo
This commit is contained in:
@@ -26,6 +26,7 @@ func NewEnv(cfg *Config) *vm.EVM {
|
||||
Origin: cfg.Origin,
|
||||
GasPrice: cfg.GasPrice,
|
||||
BlobHashes: cfg.BlobHashes,
|
||||
BlobFeeCap: cfg.BlobFeeCap,
|
||||
}
|
||||
blockContext := vm.BlockContext{
|
||||
CanTransfer: core.CanTransfer,
|
||||
|
||||
@@ -46,6 +46,7 @@ type Config struct {
|
||||
BaseFee *big.Int
|
||||
BlobBaseFee *big.Int
|
||||
BlobHashes []common.Hash
|
||||
BlobFeeCap *big.Int
|
||||
Random *common.Hash
|
||||
|
||||
State *state.StateDB
|
||||
@@ -97,7 +98,7 @@ func setDefaults(cfg *Config) {
|
||||
cfg.BaseFee = big.NewInt(params.InitialBaseFee)
|
||||
}
|
||||
if cfg.BlobBaseFee == nil {
|
||||
cfg.BlobBaseFee = new(big.Int)
|
||||
cfg.BlobBaseFee = big.NewInt(params.BlobTxMinBlobGasprice)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user