Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
267b2e19
Commit
267b2e19
authored
2 years ago
by
Hugo Trentesaux
Browse files
Options
Downloads
Patches
Plain Diff
refac: simplify syntax
parent
bf3376c8
No related branches found
No related tags found
1 merge request
!154
fix finalization when using custom genesis
Pipeline
#19478
failed
2 years ago
Stage: labels
Stage: quality
Stage: build
Stage: tests
Stage: deploy
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
node/src/chain_spec/gdev.rs
+8
-10
8 additions, 10 deletions
node/src/chain_spec/gdev.rs
with
8 additions
and
10 deletions
node/src/chain_spec/gdev.rs
+
8
−
10
View file @
267b2e19
...
...
@@ -19,10 +19,10 @@ use common_runtime::constants::*;
use
common_runtime
::
entities
::
IdtyData
;
use
common_runtime
::
*
;
use
gdev_runtime
::{
opaque
::
SessionKeys
,
AccountConfig
,
AccountId
,
AuthorityMembersConfig
,
BabeConfig
,
BalancesConfig
,
CertConfig
,
GenesisConfig
,
IdentityConfig
,
ImOnlineId
,
MembershipConfig
,
ParametersConfig
,
SessionConfig
,
SmithsCertConfig
,
SmithsMembershipConfig
,
SudoConfig
,
SystemConfig
,
TechnicalCommitteeConfig
,
UniversalDividendConfig
,
WASM_BINARY
,
opaque
::
SessionKeys
,
AccountConfig
,
AccountId
,
AuthorityMembersConfig
,
BabeConfig
,
CertConfig
,
GenesisConfig
,
IdentityConfig
,
ImOnlineId
,
MembershipConfig
,
ParametersConfig
,
SessionConfig
,
SmithsCertConfig
,
SmithsMembershipConfig
,
SudoConfig
,
SystemConfig
,
TechnicalCommitteeConfig
,
UniversalDividendConfig
,
WASM_BINARY
,
};
use
sc_service
::
ChainType
;
use
sp_authority_discovery
::
AuthorityId
as
AuthorityDiscoveryId
;
...
...
@@ -368,9 +368,7 @@ fn gen_genesis_for_local_chain(
.map
(|(
i
,
keys
)|
(
i
as
u32
+
1
,
(
keys
.0
.clone
(),
i
<
initial_authorities_len
)))
.collect
(),
},
balances
:
BalancesConfig
{
balances
:
Default
::
default
(),
},
babe
:
BabeConfig
{
authorities
:
Vec
::
with_capacity
(
0
),
epoch_config
:
Some
(
BABE_GENESIS_EPOCH_CONFIG
),
...
...
@@ -481,7 +479,7 @@ fn genesis_data_to_gdev_genesis_conf(
balances
:
Default
::
default
(),
babe
:
BabeConfig
{
authorities
:
Vec
::
with_capacity
(
0
),
epoch_config
:
Some
(
common_runtime
::
constants
::
BABE_GENESIS_EPOCH_CONFIG
),
epoch_config
:
Some
(
BABE_GENESIS_EPOCH_CONFIG
),
},
grandpa
:
Default
::
default
(),
im_online
:
Default
::
default
(),
...
...
@@ -500,14 +498,14 @@ fn genesis_data_to_gdev_genesis_conf(
identities
:
identities
.into_iter
()
.enumerate
()
.map
(|(
i
,
(
name
,
pub
key
))|
common_runtime
::
GenesisIdty
{
.map
(|(
i
,
(
name
,
owner_
key
))|
GenesisIdty
{
index
:
i
as
u32
+
1
,
name
:
common_runtime
::
IdtyName
::
from
(
name
.as_str
()),
value
:
common_runtime
::
IdtyValue
{
data
:
IdtyData
::
new
(),
next_creatable_identity_on
:
0
,
old_owner_key
:
None
,
owner_key
:
pub
key
,
owner_key
:
owner_
key
,
removable_on
:
0
,
status
:
IdtyStatus
::
Validated
,
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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