mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-18 05:55:41 +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 Horizontally Relay-routed Message Passing (HRMP). See [
|
||||
|
||||
## 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>;
|
||||
```
|
||||
|
||||
HRMP related structs:
|
||||
|
||||
```rust
|
||||
@@ -171,11 +163,6 @@ Candidate Enactment:
|
||||
> If that becomes a problem consider introducing an extra dictionary which says at what block the given sender
|
||||
> sent a message to the recipient.
|
||||
|
||||
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.
|
||||
|
||||
## Entry-points
|
||||
|
||||
The following entry-points are meant to be used for HRMP channel management.
|
||||
@@ -241,7 +228,7 @@ the parachain executed the message.
|
||||
|
||||
## 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 inbound channels of `P`, i.e. `(_, P)`,
|
||||
1. Remove all outbound channels of `P`, i.e. `(P, _)`,
|
||||
1. Remove `HrmpOpenChannelRequestCount` for `P`
|
||||
|
||||
Reference in New Issue
Block a user