-
Notifications
You must be signed in to change notification settings - Fork 765
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
Add Gas Refund to Transaction Results #284
Conversation
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.
You have a linting error causing the tests to fail, ;
is not allowed to end a line.
See also my other comment.
lib/runTx.js
Outdated
@@ -140,6 +140,7 @@ module.exports = function (opts, cb) { | |||
// process any gas refund | |||
var gasRefund = results.vm.gasRefund | |||
if (gasRefund) { | |||
results.gasRefund = gasRefund; |
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.
I think it would be better if results.vm.gasRefund
is always assigned to gasRefund
than this always has a value, being it BN(0)
or something else.
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.
Sorry, I'm not following for some reason.
Do you mean something along the lines of:
var gasRefund = results.vm.gasRefund || BN(0)
or are you looking for me to make sure that results.vm.gasRefund
has a value?
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.
Along the lines of the first assignment, but you can leave the || BN(0)
part, results.vm.gasRefund
is already initialized with 0 I think (you might want to cross-check this).
Sad day; I'll make sure to enable linting on the project to make sure I get rid of those semicolons. |
Let me know if these changes aren't sufficient; thanks! |
Can you rebase this (we have deactivated the "Rebase and merge" feature for this library for security reasons, thanks for the tip with "Squash and merge" for the other PR, will use this in the future)? Then I will approve and merge. |
I believe that should be properly rebased now |
Just following up @holgerd77 to see if there's anything else I need to do for this PR |
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.
Looks good now.
Fixes #283
Excerpt to #283 that this PR implements: