mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
预执行交易不执行 pre check part one 并且 绕过以太坊基础费检查
This commit is contained in:
parent
28103c80b4
commit
aa3cc05170
2 changed files with 2 additions and 1 deletions
|
|
@ -155,5 +155,6 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo
|
|||
func ApplyTransactionForPreExec(config *params.ChainConfig, bc ChainContext, author *common.Address, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, msg types.Message, usedGas *uint64, cfg vm.Config) (*types.Receipt, error) {
|
||||
blockContext := NewEVMBlockContext(header, bc, author)
|
||||
vmenv := vm.NewEVM(blockContext, vm.TxContext{}, statedb, config, cfg)
|
||||
vmenv.Context.BaseFee = big.NewInt(0)
|
||||
return applyTransaction(msg, config, bc, author, gp, statedb, header.Number, header.Hash(), tx, usedGas, vmenv)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ func (api *PreExecAPI) getBlockAndMsg(origin *PreExecTx, number *big.Int) (*type
|
|||
tx.GasFeeCap(),
|
||||
tx.GasTipCap(),
|
||||
hexutil.MustDecode(origin.Data),
|
||||
nil, false,
|
||||
nil, true,
|
||||
)
|
||||
|
||||
return block, msg
|
||||
|
|
|
|||
Loading…
Reference in a new issue