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

Conversation

@arkpar
Copy link
Member

@arkpar arkpar commented Jul 27, 2018

Fixes #424

@arkpar arkpar added the A0-please_review Pull request needs code review. label Jul 27, 2018
@arkpar arkpar requested a review from rphmeier July 27, 2018 09:48
pub trait IntoExit {
/// Exit signal type.
type Exit: Future<Item=(),Error=()> + Send + 'static;
/// Convet into exit signal.
Copy link
Contributor

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 {
Copy link
Contributor

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)) => {
Copy link
Contributor

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?

Copy link
Member Author

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.

@rphmeier rphmeier added A8-looksgood and removed A0-please_review Pull request needs code review. labels Jul 27, 2018

impl<P, E> IntoExit for CollationNode<P, E> where
P: ParachainContext + Send + 'static,
E: Future<Item=(),Error=()> + Send + Clone + 'static
Copy link
Contributor

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

@arkpar arkpar added A0-please_review Pull request needs code review. and removed A6-mustntgrumble labels Jul 27, 2018
@gavofyork gavofyork added A8-looksgood and removed A0-please_review Pull request needs code review. labels Jul 27, 2018
@arkpar arkpar merged commit 91c3ea9 into master Jul 28, 2018
@arkpar arkpar deleted the a-exit-fix branch July 28, 2018 06:31
dvdplm added a commit that referenced this pull request Jul 30, 2018
* 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)
  ...
liuchengxu added a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants