-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Cleanup HRMP channels that were force removed from RC state #10324
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
| ingress_channels: &[(ParaId, cumulus_primitives_core::AbridgedHrmpChannel)], | ||
| mqc_heads: &mut BTreeMap<ParaId, MessageQueueChain>, | ||
| ) { | ||
| // Complexity is O(N * lg N) but could be optimized for O(N) |
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.
Could you expand on how this could be done ?
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 Mqc Heads and ingress channels are both sorted. So instead of always calling binary search, you can keep an index and increment it. Although just writing this, I think the increment would possibly need to happen multiple times (loop).
Not sure if its worth it in practice, hence why i used the trivial approach 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.
I meant if you can write this in the comment :D
It sounds easy to implement. But anyway, yes, probably it won't bring a very big performance benefit so we can also leave it as it is for the moment.
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
Reported here https://hackmd.io/@JjziWrpMQ2OeBtz99n7JXg/ByqF7Av0ge. Change: