Skip to content
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

fix/compute-move-balance-fee #2592

Merged
merged 3 commits into from Dec 16, 2020

Conversation

sasurobert
Copy link
Contributor

small little fixes of gas used in scr and user tx
Make moveBalanceCost take into consideration SCR vs TX. SCR does not consume moveBalance

totalFee.Sub(totalFee, txProc.economicsFee.ComputeMoveBalanceFee(userTx))
moveBalanceGasLimit := txProc.economicsFee.ComputeGasLimit(userTx)
moveBalanceUserFee := txProc.economicsFee.ComputeFeeForProcessing(userTx, moveBalanceGasLimit)
totalFee.Sub(totalFee, moveBalanceUserFee)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SafeSub ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is safe :D it is a big.Int.

@@ -14,6 +14,8 @@ type feeData struct {
devFee *big.Int
}

var zero = big.NewInt(0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@raduchis raduchis merged commit a01f54b into feat/gasPrice-modifier Dec 16, 2020
@raduchis raduchis deleted the fix/compute-move-balance-fee branch December 16, 2020 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants