mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
eip-7708 fix: don't emit log when calling to self
This commit is contained in:
parent
097fe511dc
commit
012efa11ab
1 changed files with 1 additions and 1 deletions
|
|
@ -145,7 +145,7 @@ func CanTransfer(db vm.StateDB, addr common.Address, amount *uint256.Int) bool {
|
|||
func Transfer(db vm.StateDB, sender, recipient common.Address, amount *uint256.Int, blockNumber *big.Int, rules *params.Rules) {
|
||||
db.SubBalance(sender, amount, tracing.BalanceChangeTransfer)
|
||||
db.AddBalance(recipient, amount, tracing.BalanceChangeTransfer)
|
||||
if rules.IsAmsterdam && !amount.IsZero() {
|
||||
if rules.IsAmsterdam && !amount.IsZero() && sender != recipient {
|
||||
db.AddLog(types.EthTransferLog(blockNumber, sender, recipient, amount))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue