mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-14 20:15:44 +00:00
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:
@@ -4,14 +4,6 @@ A module responsible for Upward Message Passing (UMP). See [Messaging Overview](
|
||||
|
||||
## 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 related to UMP
|
||||
|
||||
```rust
|
||||
@@ -70,11 +62,6 @@ Candidate Enactment:
|
||||
1. Increment the size and the count in `RelayDispatchQueueSize` for `P`.
|
||||
1. Ensure that `P` is present in `NeedsDispatch`.
|
||||
|
||||
The following routine is intended to be called in the same time when `Paras::schedule_para_cleanup` is called.
|
||||
|
||||
`schedule_para_cleanup(ParaId)`:
|
||||
1. Add the para into the `OutgoingParas` vector maintaining the sorted order.
|
||||
|
||||
The following routine is meant to execute pending entries in upward message queues. This function doesn't fail, even if
|
||||
dispatcing any of individual upward messages returns an error.
|
||||
|
||||
@@ -92,7 +79,7 @@ dispatcing any of individual upward messages returns an error.
|
||||
|
||||
## 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 `RelayDispatchQueueSize` of `P`.
|
||||
1. Remove `RelayDispatchQueues` of `P`.
|
||||
1. Remove `P` if it exists in `NeedsDispatch`.
|
||||
|
||||
Reference in New Issue
Block a user