mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
core: restore AddFeeTransferLog post miner tipping
This commit is contained in:
parent
585dba2c83
commit
964faf2883
1 changed files with 19 additions and 0 deletions
|
|
@ -126,6 +126,8 @@ func applyTransaction(msg *Message, config *params.ChainConfig, gp *GasPool, sta
|
||||||
// pause recording read and write
|
// pause recording read and write
|
||||||
statedb.SetMVHashmap(nil)
|
statedb.SetMVHashmap(nil)
|
||||||
|
|
||||||
|
coinbaseBalance := statedb.GetBalance(evm.Context.Coinbase)
|
||||||
|
|
||||||
// resume recording read and write
|
// resume recording read and write
|
||||||
statedb.SetMVHashmap(backupMVHashMap)
|
statedb.SetMVHashmap(backupMVHashMap)
|
||||||
|
|
||||||
|
|
@ -143,6 +145,23 @@ func applyTransaction(msg *Message, config *params.ChainConfig, gp *GasPool, sta
|
||||||
|
|
||||||
// TODO(raneet10) Double check
|
// TODO(raneet10) Double check
|
||||||
statedb.AddBalance(evm.Context.Coinbase, result.FeeTipped)
|
statedb.AddBalance(evm.Context.Coinbase, result.FeeTipped)
|
||||||
|
output1 := new(big.Int).SetBytes(result.SenderInitBalance.Bytes())
|
||||||
|
output2 := new(big.Int).SetBytes(coinbaseBalance.Bytes())
|
||||||
|
|
||||||
|
// Deprecating transfer log and will be removed in future fork. PLEASE DO NOT USE this transfer log going forward. Parameters won't get updated as expected going forward with EIP1559
|
||||||
|
// add transfer log
|
||||||
|
AddFeeTransferLog(
|
||||||
|
statedb,
|
||||||
|
|
||||||
|
msg.From,
|
||||||
|
evm.Context.Coinbase,
|
||||||
|
|
||||||
|
result.FeeTipped,
|
||||||
|
result.SenderInitBalance,
|
||||||
|
coinbaseBalance,
|
||||||
|
output1.Sub(output1, result.FeeTipped),
|
||||||
|
output2.Add(output2, result.FeeTipped),
|
||||||
|
)
|
||||||
|
|
||||||
if result.Err == vm.ErrInterrupt {
|
if result.Err == vm.ErrInterrupt {
|
||||||
return nil, result.Err
|
return nil, result.Err
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue