Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
6b6820e1
Commit
6b6820e1
authored
6 years ago
by
Chevdor
Committed by
Arkadiy Paronyan
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use generated name if no name was provided (#377)
parent
5a09802e
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
polkadot/cli/Cargo.toml
+1
-0
1 addition, 0 deletions
polkadot/cli/Cargo.toml
polkadot/cli/src/lib.rs
+7
-4
7 additions, 4 deletions
polkadot/cli/src/lib.rs
with
8 additions
and
4 deletions
polkadot/cli/Cargo.toml
+
1
−
0
View file @
6b6820e1
...
...
@@ -40,3 +40,4 @@ polkadot-primitives = { path = "../primitives" }
polkadot-runtime
=
{
path
=
"../runtime"
}
polkadot-service
=
{
path
=
"../service"
}
polkadot-transaction-pool
=
{
path
=
"../transaction-pool"
}
names
=
"0.11.0"
This diff is collapsed.
Click to expand it.
polkadot/cli/src/lib.rs
+
7
−
4
View file @
6b6820e1
...
...
@@ -32,6 +32,7 @@ extern crate triehash;
extern
crate
parking_lot
;
extern
crate
serde
;
extern
crate
serde_json
;
extern
crate
names
;
extern
crate
substrate_client
as
client
;
extern
crate
substrate_network
as
network
;
...
...
@@ -82,6 +83,7 @@ use polkadot_primitives::BlockId;
use
codec
::{
Decode
,
Encode
};
use
client
::
BlockOrigin
;
use
runtime_primitives
::
generic
::
SignedBlock
;
use
names
::{
Generator
,
Name
};
use
futures
::
Future
;
use
tokio
::
runtime
::
Runtime
;
...
...
@@ -199,10 +201,11 @@ pub fn run<I, T, W>(args: I, worker: W) -> error::Result<()> where
let
(
spec
,
is_global
)
=
load_spec
(
&
matches
)
?
;
let
mut
config
=
service
::
Configuration
::
default_with_spec
(
spec
);
if
let
Some
(
name
)
=
matches
.value_of
(
"name"
)
{
config
.name
=
name
.into
();
info!
(
"Node name: {}"
,
config
.name
);
}
config
.name
=
match
matches
.value_of
(
"name"
)
{
None
=>
Generator
::
with_naming
(
Name
::
Numbered
)
.next
()
.unwrap
(),
Some
(
name
)
=>
name
.into
(),
};
info!
(
"Node name: {}"
,
config
.name
);
let
base_path
=
base_path
(
&
matches
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment