Skip to content

Commit

Permalink
Merge pull request #2732 from OffchainLabs/zombies-for-v1.14.2
Browse files Browse the repository at this point in the history
Explicitly create zombies for geth v1.14.2
  • Loading branch information
tsahee authored Nov 21, 2024
2 parents cc0d1a7 + e9447ab commit af7fe8f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions arbos/util/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ func TransferBalance(
if arbmath.BigLessThan(balance.ToBig(), amount) {
return fmt.Errorf("%w: addr %v have %v want %v", vm.ErrInsufficientBalance, *from, balance, amount)
}
evm.StateDB.SubBalance(*from, uint256.MustFromBig(amount), tracing.BalanceChangeTransfer)
if evm.Context.ArbOSVersion >= 30 {
// ensure the from account is "touched" for EIP-161
evm.StateDB.AddBalance(*from, &uint256.Int{}, tracing.BalanceChangeTransfer)
if evm.Context.ArbOSVersion < 30 && amount.Sign() == 0 {
evm.StateDB.CreateZombieIfDeleted(*from)
}
evm.StateDB.SubBalance(*from, uint256.MustFromBig(amount), tracing.BalanceChangeTransfer)
}
if to != nil {
evm.StateDB.AddBalance(*to, uint256.MustFromBig(amount), tracing.BalanceChangeTransfer)
Expand Down

0 comments on commit af7fe8f

Please sign in to comment.