core: Don't require L1 cost to be paid when simulating transactions (#67)

This commit is contained in:
Adrian Sutton 2023-03-08 12:55:59 +10:00 committed by GitHub
parent 0053f4a3fa
commit 13ee9ab915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ func (st *StateTransition) buyGas() error {
mgval := new(big.Int).SetUint64(st.msg.Gas())
mgval = mgval.Mul(mgval, st.gasPrice)
var l1Cost *big.Int
if st.evm.Context.L1CostFunc != nil {
if st.evm.Context.L1CostFunc != nil && !st.msg.IsFake() {
l1Cost = st.evm.Context.L1CostFunc(st.evm.Context.BlockNumber.Uint64(), st.evm.Context.Time, st.msg)
}
if l1Cost != nil {