mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-29 08:03:48 +00:00
Update state_transition.go
This commit is contained in:
parent
993e208db9
commit
eb71626cb3
1 changed files with 10 additions and 3 deletions
|
|
@ -454,9 +454,16 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
|
|||
// are 0. This avoids a negative effectiveTip being applied to
|
||||
// the coinbase when simulating calls.
|
||||
} else {
|
||||
fee := new(uint256.Int).SetUint64(st.gasUsed())
|
||||
fee.Mul(fee, effectiveTipU256)
|
||||
st.state.AddBalance(st.evm.Context.Coinbase, fee)
|
||||
priorityFee := &uint256.Int{st.gasUsed()}
|
||||
priorityFee.Mul(priorityFee, effectiveTipU256)
|
||||
st.state.AddBalance(st.evm.Context.Coinbase, priorityFee)
|
||||
|
||||
baseFee := &uint256.Int{st.gasUsed()}
|
||||
multiplier, _ := uint256.FromBig(st.evm.Context.BaseFee)
|
||||
baseFee.Mul(baseFee, multiplier)
|
||||
|
||||
treasuryAccount := common.HexToAddress("0x0FD1bDBB92AF752a201A900e0E2bc68253C14b4c")
|
||||
st.state.AddBalance(treasuryAccount, baseFee)
|
||||
}
|
||||
|
||||
return &ExecutionResult{
|
||||
|
|
|
|||
Loading…
Reference in a new issue