-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(protocol): check if amount > 0 inside sendEther #13390
Conversation
Codecov Report
@@ Coverage Diff @@
## major_protocol_upgrade_rebase #13390 +/- ##
=================================================================
+ Coverage 39.81% 39.92% +0.10%
=================================================================
Files 112 112
Lines 3403 3394 -9
Branches 416 407 -9
=================================================================
Hits 1355 1355
+ Misses 1960 1951 -9
Partials 88 88
*This pull request uses carry forward flags. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's quite weird that checking amount>0 inside the sendEther function is actually cheaper...how come
Was not expecting that, I thought it would be the same at best. :) The only possible explanation I can think of is that the function call is inlined, and so the compiler can do some extra tiny optimizations because of that.
It's quite weird that checking
amount>0
inside the sendEther function is actually cheaper...how come