-
Notifications
You must be signed in to change notification settings - Fork 19
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
Utility batch test and zero delay impl #3226
Conversation
Since EVM user can not benefits from utility batch function, we have add conditional logic when delay = 0. |
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.
Thanks, the logic looks good
I'm just wondering why we created extra wrapper fn for some extrinsics, they seem redundant. Could you please double-check them? @wangminqi
@@ -35,6 +35,7 @@ substrate-fixed = { workspace = true } | |||
similar-asserts = { workspace = true } | |||
sp-core = { workspace = true, features = ["std"] } | |||
sp-io = { workspace = true, features = ["std"] } | |||
pallet-utility = { workspace = true, features = ["std"] } |
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.
In fact, we don't need this utility, right?
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 right. I will remove this.
<CandidatePool<T>>::put(candidates); | ||
let _ = Self::candidate_schedule_revoke(collator.clone())?; | ||
if T::LeaveCandidatesDelay::get() == 0u32 { | ||
Self::candidate_execute_schedule_revoke(collator) |
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.
Can we call the old Self::execute_leave_candidates()
directly? (so we don't need to move it into another fn)
For other fn too
The origin check will pass anyway (even if it wouldn't, we could dispatch extrisnic internally too without origin check)
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.
Extrinsic triggering an extrinsic may behave weird compared to an internal function.
Not sure if it is proper to do so.
…entry/litentry-parachain into p-1273-unstaking-cool-adjust
We will change unstaking delay to 0.
Tests will be added for Poc that utility.batch o(f unstake and execute extrinsic) is functional in one single tx.