Initializer + Paras Clean Up Messages When Offboarding (#2413)

* initial hack in

* finish up

* use notification to pass outgoing paras

* move outgoing paras from notifications

* missing comma

* update guides

* clean up
This commit is contained in:
Shawn Tabrizi
2021-02-15 13:48:25 -04:00
committed by GitHub
parent 22f85c809b
commit eb0159f288
10 changed files with 116 additions and 149 deletions
@@ -4,14 +4,6 @@ A module responsible for Downward Message Processing (DMP). See [Messaging Overv
## Storage
General storage entries
```rust
/// Paras that are to be cleaned up at the end of the session.
/// The entries are sorted ascending by the para id.
OutgoingParas: Vec<ParaId>;
```
Storage layout required for implementation of DMP.
```rust
@@ -54,6 +46,6 @@ Utility routines.
## Session Change
1. Drain `OutgoingParas`. For each `P` happened to be in the list:
1. For each `P` in `outgoing_paras` (generated by `Paras::on_new_session`):
1. Remove all `DownwardMessageQueues` of `P`.
1. Remove `DownwardMessageQueueHeads` for `P`.