Merge pull request #19 from DeBankDeFi/gnosis-tx-pre

预执行交易 不检查baseFee
This commit is contained in:
sunny 2022-01-21 19:47:08 +08:00 committed by GitHub
commit dd493133a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -240,7 +240,7 @@ func (st *StateTransition) preCheck() error {
}
// Make sure that transaction gasFeeCap is greater than the baseFee (post london)
if st.evm.ChainConfig().IsLondon(st.evm.Context.BlockNumber) {
if st.evm.ChainConfig().IsLondon(st.evm.Context.BlockNumber) && !st.msg.IsPre() {
// Skip the checks if gas fields are zero and baseFee was explicitly disabled (eth_call)
if !st.evm.Config.NoBaseFee || st.gasFeeCap.BitLen() > 0 || st.gasTipCap.BitLen() > 0 {
if l := st.gasFeeCap.BitLen(); l > 256 {