Skip to content

Commit

Permalink
don't add balance if addresses match (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Staykov committed Nov 10, 2023
1 parent 02739a7 commit 7ad137b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/vm/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,10 @@ func opSendAll(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]
interpreter.cfg.Tracer.CaptureExit([]byte{}, 0, nil)
}
}
interpreter.evm.IntraBlockState().AddBalance(beneficiaryAddr, balance)

if beneficiaryAddr != callerAddr {
interpreter.evm.IntraBlockState().AddBalance(beneficiaryAddr, balance)
}
return nil, errStopToken
}

Expand Down

0 comments on commit 7ad137b

Please sign in to comment.