Rewrite client handling (#1531)

* Rewrite client handling

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.

* Apply suggestions from code review

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>

* Up the versions

* Fix Cargo.lock

* Fix merge conflict

* ......................

* ....v2

* yep

* I'm dumb...

* Browser lol

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
Bastian Köcher
2020-08-04 14:53:47 +02:00
committed by GitHub
parent 07a9d2de3f
commit c01aa8bae8
10 changed files with 365 additions and 382 deletions
+4 -4
View File
@@ -131,17 +131,17 @@ pub fn run() -> Result<()> {
runner.run_node_until_exit(|config| {
let role = config.role.clone();
let builder = service::NodeBuilder::new(config);
match role {
Role::Light => builder.build_light().map(|(task_manager, _)| task_manager),
_ => builder.build_full(
Role::Light => service::build_light(config).map(|(task_manager, _)| task_manager),
_ => service::build_full(
config,
None,
None,
authority_discovery_disabled,
6000,
grandpa_pause,
),
).map(|r| r.0),
}
})
},