mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 13:21:37 +00:00
miner: restore GasUsed assignment in applyTransaction
The BAL refactoring in 5808d212b removed the line that sets
header.GasUsed = gasPool.Used() after each transaction in the
miner's applyTransaction. This caused all geth-proposed blocks
to have GasUsed=0 in the header, which every other client
rejects during validation.
This commit is contained in:
parent
b3113baec8
commit
8461385e0d
1 changed files with 1 additions and 0 deletions
|
|
@ -461,6 +461,7 @@ func (miner *Miner) applyTransaction(env *environment, tx *types.Transaction) (*
|
||||||
env.accessList.AccumulateMutations(mutations, uint16(env.tcount)+1)
|
env.accessList.AccumulateMutations(mutations, uint16(env.tcount)+1)
|
||||||
env.accessList.AccumulateReads(env.state.Reader().(state.StateReaderTracker).GetStateAccessList())
|
env.accessList.AccumulateReads(env.state.Reader().(state.StateReaderTracker).GetStateAccessList())
|
||||||
}
|
}
|
||||||
|
env.header.GasUsed = env.gasPool.Used()
|
||||||
return receipt, err
|
return receipt, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue