-
Notifications
You must be signed in to change notification settings - Fork 678
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
fix: account version serialization tests #12871
base: master
Are you sure you want to change the base?
Conversation
amount: 1_000_000, | ||
locked: 1_000_000, | ||
code_hash: CryptoHash::hash_bytes(&[42]), | ||
storage_usage: 100, | ||
}; | ||
let old_account = Account::V1(account_v1.clone()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old account is expected to be just AccountV1
(not wrapped in enum) since that is the old representation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the issue with that is that the serde
/ borsh
traits are implemented for the Account
enum. Should I also implement them for AccountV1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the exact problem you trying to solve here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to introduce the AccountContractType
enum here but the serde v1 test fails if it is not wrapped in Account
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are not allowed to remove fields from SerdeAccount
that breaks backward compatibility
No description provided.