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

Refactor unpack and make test more robust #3417

Merged

Conversation

CriesofCarrots
Copy link
Contributor

#3416 added some guard rails, but we already have an elegant way of doing this in token-2022.
This PR refactors those checks to match, and makes the unpack unit test exhaustive.

mvines
mvines previously approved these changes Aug 3, 2022
@mergify mergify bot dismissed mvines’s stale review August 3, 2022 07:02

Pull request has been modified.

@CriesofCarrots
Copy link
Contributor Author

Will bump spl-token to v3.3.1 before merging this

@CriesofCarrots CriesofCarrots merged commit c618de3 into solana-labs:master Aug 3, 2022
joncinque added a commit to joncinque/solana-program-library that referenced this pull request Aug 3, 2022
joncinque added a commit that referenced this pull request Aug 3, 2022
* token: Reassign and reallocate accounts on close

* Revert "Refactor unpack and make test more robust (#3417)"

This reverts commit c618de3.

* Revert "check that unpack is tolerant of small sizes (#3416)"

This reverts commit 22faa05.

* Also revert d7f352b
CriesofCarrots added a commit to CriesofCarrots/solana-program-library that referenced this pull request Aug 3, 2022
* Refactor hasty fix to match token-2022

* Make test exhaustive

* cargo fmt

Co-authored-by: Michael Vines <mvines@gmail.com>
CriesofCarrots added a commit that referenced this pull request Aug 4, 2022
* check that unpack is tolerant of small sizes (#3416)

* Refactor unpack and make test more robust (#3417)

* Refactor hasty fix to match token-2022

* Make test exhaustive

* cargo fmt

Co-authored-by: Michael Vines <mvines@gmail.com>

* Readd proptests without losing unit test, #3421

Co-authored-by: anatoly yakovenko <anatoly@solana.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
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

2 participants