-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Exit signal gets its own trait #433
Conversation
substrate/cli/src/lib.rs
Outdated
| pub trait IntoExit { | ||
| /// Exit signal type. | ||
| type Exit: Future<Item=(),Error=()> + Send + 'static; | ||
| /// Convet into exit signal. |
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.
typo: Convert
| type Exit = future::MapErr<oneshot::Receiver<()>, fn(oneshot::Canceled) -> ()>; | ||
|
|
||
| fn exit_only(&self) -> Self::Exit { | ||
| fn into_exit(self) -> Self::Exit { |
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.
nice!
| match cli::prepare_execution::<service::Factory, _, _, _, _>(args, worker, version, load_spec, "parity-polkadot")? { | ||
| cli::Action::ExecutedInternally => (), | ||
| cli::Action::RunService(mut config) => { | ||
| cli::Action::RunService((mut config, worker)) => { |
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.
Hm, I'm not sure how it works. The second item in tuple of Action::RunService is bound to be IntoExit, why it's called worker here? Why worker.configuration() works here?
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.
Action returns back the same thing that was passed to prepare_execution if it was not used.
polkadot/collator/src/lib.rs
Outdated
|
|
||
| impl<P, E> IntoExit for CollationNode<P, E> where | ||
| P: ParachainContext + Send + 'static, | ||
| E: Future<Item=(),Error=()> + Send + Clone + 'static |
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.
Clone bound no longer required
* master: (86 commits) Make contract a separate runtime module (#345) Version bump (#450) DB-based blockchain data cache for light nodes (#251) Update libp2p again (#445) Update version on git head change (#444) Fix the public key of bootnode 3 (#441) Update libp2p (#442) Switch to the master branch of libp2p (#427) Export ws port 9944 and add doc (#440) Iterate over overlay to decide which keys to purge (#436) Exit signal gets its own trait (#433) Add docker image (#375) Reset peers.json if the content is not loadable (#405) Limit number of incoming connections (#391) Fix memory leaks in libp2p (#432) Do not queue empty blocks set for import (#431) 5 random fixes (#1) (#435) Chore: fix typo (#434) Prevent building invalid blocks (#430) Better logging for public key mismatch (#429) ...
Fixes #424