-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Process incoming foreground messages while subscribing (#2705)
Calling `relay_chain_sync.subscribe_all(...).await` might take a long time (as it waits for the runtime of the chain to have been downloaded), during which messages coming from the public API of the sync service just pile up and aren't answered. This PR fixes this by answering messages while we wait for the subscription to happen. The consequence is that a parachain initialization now finishes quickly, while before it was waiting for its relay chain initialization to finish. It also means that we now properly clean up parachains if we remove them, even if their relay chain never downloads its runtime. Before, the clean up didn't happen because the clean up never happens before initialization is complete. I'm not really happy with the code duplication here, and would perform a refactoring that moves local variables into a struct, and adds methods to that struct, similar to `standalone.rs`. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
a8736e3
commit ce720cc
Showing
2 changed files
with
105 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters