-
Notifications
You must be signed in to change notification settings - Fork 379
Migrate from MQCs in persisted validation data to merkle proofs #317
Conversation
pepyakin
commented
Jan 29, 2021
•
edited
Loading
edited
- Run this locally to check if it works
877f007
to
b259a74
Compare
b259a74
to
ca992ed
Compare
Some changes related to tests were lost somehow. WIP |
I cannot test this locally, blocked by paritytech/polkadot#2373 I think we can still review and land this and test the whole thing asynchronously |
/// If there is no channel, a new default one is created. | ||
/// | ||
/// It also updates the `hrmp_ingress_channel_index`, creating it if needed. | ||
pub fn upsert_inbound_channel(&mut self, sender: ParaId) -> &mut AbridgedHrmpChannel { |
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.
upsert
I needed to google this :D But I also got no better idea.
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.
Rust uses get_or_insert
, here. Perhaps we could use it, but that seemed to me a bit overly long.
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.
Yeah IDK
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 also thought about this, but it would probably too long as you said.
Co-authored-by: Bastian Köcher <[email protected]>