-
Notifications
You must be signed in to change notification settings - Fork 14
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
Token claims and vesting runtime tests #445
Conversation
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.
Looks good so far, but a couple of changes are required.
- the
switch_block
helper doesn't look right, we should probably invoke a more realistic block switching or none at all - the calls are tests via direct invocation, which doesn't test the signed ext, which we should do; I'll add the corresponding entries to the todo list
7c5b8bc
to
e12449a
Compare
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.
Great! Now I'll do a more thorough review on this code once again, and either request more changes or we'll be good to merge.
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.
Tests for direct calls need to test for the errors too. Errors have to be tested for:
- direct calls
- dispatch validate
- dispatch pre/post
These three implementations are potentially different, so we need to ensure each of them handles errors (in their own way) correctly.
But still, to clarify, no tests for individual SignedExtension
s are needed, only for the combined SignedExtra
.
d4d234e
to
a0fa379
Compare
Runtime tests for token claims and vesting integration paritytech/substrate#441 .
To do
claim
call: claiming without vesting works:claim
call: claiming with vesting worksunlock
call: unlocking partial balance worksunlock
call: unlocking full balance worksclaim
transactionclaim
transactions, preventing them getting into the transaction pool