-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Allow using any polkadot client instead of enum Client #1575
Conversation
14590ff to
fb78f0b
Compare
service/src/client.rs
Outdated
| /// Yet Another ExecuteWithClient | ||
| pub trait YaExecuteWithClient { | ||
| /// Execute the given something with the client. | ||
| fn execute_with<T: ExecuteWithClient>(&self, t: T) -> T::Output; | ||
| } |
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'm not sure how to call it... ClientExecutor? ClientExecutionContext? @bkchr
| where | ||
| SP: SpawnNamed + Clone + Send + Sync + 'static; | ||
| SP: SpawnNamed + Clone + Send + Sync + 'static, | ||
| Backend: BackendT<Block>, |
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 was sooo happy that we got rid off it :P But yeah, this will also make some code easier in Cumulus 👍
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 AM SO SORRY
service/src/client.rs
Outdated
| } | ||
|
|
||
| /// Yet Another ExecuteWithClient | ||
| pub trait YaExecuteWithClient { |
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.
Maybe ClientHandle?
With a much better documentation on what it does and why we need it? Something like:
/// A handle to a Polkadot client instance
///
/// The Polkadot service supports multiple different runtimes, like
/// Westend, Polkadot itself, etc. As each runtime has a specialized
/// client, we need to hide them behind a trait. This is this trait.
///
/// When wanting to work with the inner client, you need to use [`execute_with`](ClientHandle::execute_with).
/// See [`ExecuteWithClient`] for more information.
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.
omg I was not expecting that much 😆 🙏
|
bot merge |
|
Missing process info; check that the PR belongs to a project column. |
|
bot merge |
|
Waiting for commit status. |
* WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * Apply suggestions from code review * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * CLEANUP Forked at: e916423 Parent branch: origin/rococo-branch * link in doc * doc
* master: Make parachain validation wasm executor functional (#1574) Use async test helper to simplify node testing (#1578) guide: validation data refactoring (#1576) Remove v0 parachains runtime (#1501) [CI] Add github token to generate-release-text (#1581) Allow using any polkadot client instead of enum Client (#1575) service/src/lib: Update authority discovery construction (#1563) Update .editorconfig to what we have in practice (#1545) Companion PR for substrate #6672 (#1560) pre-redenomination tockenSymbol change (#1561)
…n-race-condition * master: Companion PR for #6862 (#1564) implement collation generation subsystem (#1557) Add spawn_blocking to SubsystemContext (#1570) Companion PR for #6846 (#1568) overseer: add a test to ensure all subsystem receive msgs (#1590) Implementer's Guide: Flesh out more details for upward messages (#1556) Make parachain validation wasm executor functional (#1574) Use async test helper to simplify node testing (#1578) guide: validation data refactoring (#1576) Remove v0 parachains runtime (#1501) [CI] Add github token to generate-release-text (#1581) Allow using any polkadot client instead of enum Client (#1575) service/src/lib: Update authority discovery construction (#1563)
* master: overseer: fix build (#1596) Companion PR for #6862 (#1564) implement collation generation subsystem (#1557) Add spawn_blocking to SubsystemContext (#1570) Companion PR for #6846 (#1568) overseer: add a test to ensure all subsystem receive msgs (#1590) Implementer's Guide: Flesh out more details for upward messages (#1556) Make parachain validation wasm executor functional (#1574) Use async test helper to simplify node testing (#1578) guide: validation data refactoring (#1576) Remove v0 parachains runtime (#1501) [CI] Add github token to generate-release-text (#1581) Allow using any polkadot client instead of enum Client (#1575) service/src/lib: Update authority discovery construction (#1563) Update .editorconfig to what we have in practice (#1545) Companion PR for substrate #6672 (#1560) pre-redenomination tockenSymbol change (#1561)
* WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * Apply suggestions from code review * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * WIP Forked at: e916423 Parent branch: origin/rococo-branch * CLEANUP Forked at: e916423 Parent branch: origin/rococo-branch * link in doc * doc
Related to paritytech/cumulus#199