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

owner_by_id updated from TreeMap to UnorderedMap #810

Closed
wants to merge 1 commit into from

Conversation

zavodil
Copy link

@zavodil zavodil commented May 9, 2022

owner_by_id updated from TreeMap to Unordered map due to #800. simulate_mass_mint test introduced.

Please review if my version upgrade was correct.

@zavodil zavodil requested a review from BenKurrek May 9, 2022 22:45
@zavodil zavodil changed the title owner_by_id updated from TreeMap to Unordered map owner_by_id updated from TreeMap to UnorderedMap May 9, 2022
Copy link
Contributor

@austinabell austinabell left a comment

Choose a reason for hiding this comment

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

As noted in the review, can't make this change because it's state breaking

@@ -107,7 +107,7 @@ impl NonFungibleToken {
let mut this = Self {
owner_id,
extra_storage_in_bytes_per_token: 0,
owner_by_id: TreeMap::new(owner_by_id_prefix),
owner_by_id: UnorderedMap::new(owner_by_id_prefix),
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't just change this because it is state-breaking and will break for anyone trying to update their NFT version.

If you need this change, you probably just want to fork this logic

@@ -1,6 +1,6 @@
[package]
name = "near-contract-standards"
version = "4.0.0-pre.8"
version = "4.0.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't change to this

@austinabell
Copy link
Contributor

Going to close this, since this change will come with #918 and cannot come in like this

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.

2 participants