-
Notifications
You must be signed in to change notification settings - Fork 989
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
Subtract refund from feeCharged #4171
Conversation
… fails with txINSUFFICIENT_FEE in the tx queue
@@ -813,6 +813,8 @@ TransactionFrame::refundSorobanFee(AbstractLedgerTxn& ltxOuter) | |||
return; | |||
} | |||
|
|||
getResult().feeCharged -= feeRefund; |
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.
No chance of feeCharged going negative here, right?
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.
There should be no way for this to happen because we always initialize feeCharged to the charged fee. If it were to go negative due to a bug (feeCharged is a int64), it wouldn't be catastrophic from a core perspective because we don't use the value, but would definitely need to be fixed.
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 but it looks like a test file changed?
The second commit modifies an existing test to make sure that |
r+ 2048569 |
Description
Resolves #4161
Checklist
clang-format
v8.0.0 (viamake format
or the Visual Studio extension)