-
Notifications
You must be signed in to change notification settings - Fork 495
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
gas counter in test sums deploy cost to first transaction #2219
Comments
Just to be sure, you mean the gas counted in the little parenthesizes next to the test name? So |
Yes! Exactly. So I am developing something and I got scared that I screw it up because it was too expansive! So I was refactoring until figure out that the problem was with the gas counter, not with my logic. I would expect that this counter only shows the gas cost into the transactions that occurred within, not what happened before (such as deploying through Embark config): This cost is added to the first case of the tests. |
Yeah you are totally right, it's a mistake on our part. We'll fix it soon:tm: Thanks for reporting it! |
The gas is counted incorrect in the first time .send() is invoked, because it also sums the cost of deploy the transaction.
I had to do a workaround (see status-im/account-contracts@291fd9b#diff-8ae90872f0505462a211bc1fa2f5f03eR28 ) to show proper gas, which is a transaction to anywhere before doing the other transactions I want to test.
The text was updated successfully, but these errors were encountered: