Geth 1.13 (Cancun) update #8

Merged
roysc merged 18 commits from update-geth-1.13 into v5 2024-08-06 21:06:38 +00:00
Showing only changes of commit 43ccaba4b8 - Show all commits

View File

@ -334,7 +334,7 @@ func applyTransactions(block *types.Block, backend *ipldeth.Backend) (*ipldstate
evm.Reset(core.NewEVMTxContext(msg), statedb)
// Apply the transaction to the current state (included in the env).
if _, err := core.ApplyMessage(evm, msg, &gp); err != nil {
return nil, fmt.Errorf("transaction %#x failed: %w", tx.Hash(), err)
return nil, fmt.Errorf("error applying tx %#x: %w", tx.Hash(), err)
}
if config.IsByzantium(block.Number()) {
@ -344,6 +344,14 @@ func applyTransactions(block *types.Block, backend *ipldeth.Backend) (*ipldstate
}
}
// Withdrawals processing.
for _, w := range block.Withdrawals() {
// Convert amount from gwei to wei.
amount := new(uint256.Int).SetUint64(w.Amount)
amount = amount.Mul(amount, uint256.NewInt(params.GWei))
statedb.AddBalance(w.Address, amount)
}
if config.Ethash != nil {
accumulateRewards(config, statedb, block.Header(), block.Uncles())
}