This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
NetworkService::new starts the network #462
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arkpar
reviewed
Jul 31, 2018
@@ -276,8 +273,6 @@ impl<Components> Drop for Service<Components> where Components: components::Comp | |||
fn drop(&mut self) { | |||
debug!(target: "service", "Substrate service shutdown"); | |||
|
|||
self.network.stop_network(); |
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.
Doest the shutdown of an authority node on Ctrl-C work OK after this? IIRC this was required so that network would terminate Future
streams it exposes and that would release the BFT process and allow it to terminate.
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.
drop implements that same behaviour, so drop(self.network.take());
in the following line should have the same effect.
tomaka
force-pushed
the
network-always-started
branch
from
August 5, 2018 08:18
34d43bb
to
c4afd28
Compare
gnunicorn
approved these changes
Aug 6, 2018
gnunicorn
added
A8-looksgood
and removed
A0-please_review
Pull request needs code review.
labels
Aug 6, 2018
gavofyork
pushed a commit
that referenced
this pull request
Aug 10, 2018
lamafab
pushed a commit
to lamafab/substrate
that referenced
this pull request
Jun 16, 2020
* update substrate to latest polkadot-master * fix test runtime
helin6
pushed a commit
to boolnetwork/substrate
that referenced
this pull request
Jul 25, 2023
* Update scale-info and parity-scale-codec requirements * Update CHANGELOG * Update frame-metadata * Update bitvec * Fix test * Update bitvec event decoding * More bitvec updates * Update substrate primitives dependencies * Fix up bitvec errors and decode error * Fix up bitvec errors * Update polkadot codegen
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of creating the service with
new()
, then callingstart()
, we do both at once.This makes the code of
NetworkService
much more straight-forward, and is IMO better programming practices.If we ever want to be able to stop the network, I suggest using a
Option<NetworkService>
instead.