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

ifl-744 add test/updates for calculating raw transaction size #3854

Merged
merged 1 commit into from
May 1, 2023

Conversation

jowparks
Copy link
Contributor

@jowparks jowparks commented Apr 26, 2023

Summary

Updates size to match https://github.com/iron-fish/ironfish/blob/master/ironfish/src/primitives/transaction.ts#L44

We have to account for change notes as well. We can determine if there will be change for each asset by calculating the total spends/mints/burns/outputs. If they equal 0, there will be no change note

Testing Plan

tests pass

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.

[ ] Yes

@jowparks jowparks requested a review from dguenther April 26, 2023 19:28
@jowparks jowparks requested a review from a team as a code owner April 26, 2023 19:28
@jowparks jowparks marked this pull request as draft April 26, 2023 19:28
@jowparks jowparks force-pushed the joe/ifl-744/rawtransaction-size-test branch 2 times, most recently from c449091 to 53b3fe2 Compare April 26, 2023 22:17
@jowparks jowparks force-pushed the joe/ifl-744/rawtransaction-size-test branch 2 times, most recently from d09b594 to 2b6b6b8 Compare April 26, 2023 22:22
@jowparks jowparks marked this pull request as ready for review April 26, 2023 22:27
@jowparks jowparks force-pushed the joe/ifl-744/rawtransaction-size-test branch from 2b6b6b8 to ab0cfa6 Compare April 27, 2023 15:49
@jowparks jowparks changed the base branch from master to staging April 27, 2023 15:50
@jowparks jowparks force-pushed the joe/ifl-744/rawtransaction-size-test branch from ab0cfa6 to 170c343 Compare April 27, 2023 15:55
@jowparks jowparks force-pushed the joe/ifl-744/rawtransaction-size-test branch 2 times, most recently from 698405b to 1143157 Compare April 28, 2023 21:24
@jowparks jowparks requested review from dguenther and hughy April 28, 2023 21:25
@@ -84,6 +84,10 @@ describe('RawTransaction', () => {
const mintedValue = valuesByAsset.get(asset.id())
Assert.isNotUndefined(mintedValue)
expect(mintedValue).toEqual(1n)
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 a nice future proofing test

@jowparks jowparks force-pushed the joe/ifl-744/rawtransaction-size-test branch from 1143157 to 31bccef Compare April 28, 2023 22:46
@dguenther dguenther merged commit 46540c4 into staging May 1, 2023
@dguenther dguenther deleted the joe/ifl-744/rawtransaction-size-test branch May 1, 2023 15:43
@dguenther dguenther mentioned this pull request May 9, 2023
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.

6 participants