Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Rewrite client handling #1531

Merged
merged 11 commits into from
Aug 4, 2020
Merged

Rewrite client handling #1531

merged 11 commits into from
Aug 4, 2020

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Aug 4, 2020

We are supporting muliple polkadot-like chains and all have different
client types. This pr reworks the client handling by having all of them
in one enum combined. Besides that, there is added a special trait
ExecuteWithClient to use the internal client.

We are supporting muliple polkadot-like chains and all have different
client types. This pr reworks the client handling by having all of them
in one enum combined. Besides that, there is added a special trait
`ExecuteWithClient` to use the internal client.
@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Aug 4, 2020
@bkchr bkchr requested a review from cecton August 4, 2020 08:14
service/src/client.rs Outdated Show resolved Hide resolved
service/src/client.rs Outdated Show resolved Hide resolved
pub enum Client {
Polkadot(Arc<crate::FullClient<polkadot_runtime::RuntimeApi, crate::PolkadotExecutor>>),
Westend(Arc<crate::FullClient<westend_runtime::RuntimeApi, crate::WestendExecutor>>),
Kusama(Arc<crate::FullClient<kusama_runtime::RuntimeApi, crate::KusamaExecutor>>),
Copy link
Contributor

@rphmeier rphmeier Aug 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you add a Rococo variant here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the pr was not yet merged :)

@@ -52,7 +52,7 @@ pub use polkadot_runtime;
pub use kusama_runtime;
pub use westend_runtime;
use prometheus_endpoint::Registry;
pub use self::client::PolkadotClient;
pub use self::client::*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better to explicitly export. glob re-exports scare me :)

Copy link
Contributor

@rphmeier rphmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks OK. I'm not sure what we will do about service-new - won't we want the same thing there?

@bkchr bkchr merged commit f5c8425 into master Aug 4, 2020
@bkchr bkchr deleted the bkchr-rework-client-handling branch August 4, 2020 12:53
ordian added a commit that referenced this pull request Aug 5, 2020
* master:
  Unalias Substrate Imports (#1530)
  Rewrite client handling (#1531)
  Integrate ChainApi with all messages (#1533)
  Add Rococo test network (#1363)
  Fix a typo parathreads -> parachains (#1529)
  Cleanup upcoming paras (#1527)
  Sudo wrapper for paras (#1517)
  Implementer's guide: notes on contextual execution (#1525)
  Companion for substrate/6782 (#1523)
  Sort out validation errors (#1516)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants