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

Bug/Use original_id of parent for new token original_id #38

Merged
merged 2 commits into from
Feb 7, 2022

Conversation

jonmattgray
Copy link
Contributor

@jonmattgray jonmattgray commented Feb 7, 2022

When multiple tokens are about the same thing e.g a PO, we want them all to have the same original_id. This PR changes the pallet to correctly assign original_id rather than the id of a parent to a new token's original_id.

e.g. assuming all these tokens are about the same thing, such as a Quote. This PR goes from this:
Token 1: id: 1 original_id: 1
Token 2: id: 2 original_id: 1
Token 3: id: 3 original_id: 2 // this is wrong

to this
Token 1: id: 1 original_id: 1
Token 2: id: 2 original_id: 1
Token 3: id: 3 original_id: 1 // this is correct

Copy link
Contributor

@mattdean-digicatapult mattdean-digicatapult left a comment

Choose a reason for hiding this comment

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

Good catch. Note this introduces extra storage gets so weights should be updated

@jonmattgray jonmattgray merged commit d12f340 into main Feb 7, 2022
@jonmattgray jonmattgray deleted the bug/original-id branch February 7, 2022 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants