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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
b8960000
Commit
b8960000
authored
1 year ago
by
Hugo Trentesaux
Browse files
Options
Downloads
Patches
Plain Diff
FIX initial monetary mass in balances config
parent
8c0a09f5
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#33245
waiting for manual action
Stage: quality
Stage: build
Stage: tests
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
node/src/chain_spec/gdev.rs
+4
-5
4 additions, 5 deletions
node/src/chain_spec/gdev.rs
node/src/chain_spec/gtest.rs
+7
-11
7 additions, 11 deletions
node/src/chain_spec/gtest.rs
with
11 additions
and
16 deletions
node/src/chain_spec/gdev.rs
+
4
−
5
View file @
b8960000
...
@@ -18,12 +18,11 @@ use super::*;
...
@@ -18,12 +18,11 @@ use super::*;
use
common_runtime
::
constants
::
*
;
use
common_runtime
::
constants
::
*
;
use
common_runtime
::
entities
::
IdtyData
;
use
common_runtime
::
entities
::
IdtyData
;
use
common_runtime
::
*
;
use
common_runtime
::
*
;
use
gdev_runtime
::
BalancesConfig
;
use
gdev_runtime
::{
use
gdev_runtime
::{
opaque
::
SessionKeys
,
AccountConfig
,
AccountId
,
AuthorityMembersConfig
,
BabeConfig
,
CertConfig
,
opaque
::
SessionKeys
,
AccountConfig
,
AccountId
,
AuthorityMembersConfig
,
BabeConfig
,
GenesisConfig
,
IdentityConfig
,
ImOnlineId
,
MembershipConfig
,
ParametersConfig
,
SessionConfig
,
BalancesConfig
,
CertConfig
,
GenesisConfig
,
IdentityConfig
,
ImOnlineId
,
MembershipConfig
,
SmithCertConfig
,
SmithMembershipConfig
,
SudoConfig
,
SystemConfig
,
TechnicalCommitteeConfig
,
ParametersConfig
,
SessionConfig
,
SmithCertConfig
,
SmithMembershipConfig
,
SudoConfig
,
UniversalDividendConfig
,
WASM_BINARY
,
SystemConfig
,
TechnicalCommitteeConfig
,
UniversalDividendConfig
,
WASM_BINARY
,
};
};
use
sc_service
::
ChainType
;
use
sc_service
::
ChainType
;
use
sp_authority_discovery
::
AuthorityId
as
AuthorityDiscoveryId
;
use
sp_authority_discovery
::
AuthorityId
as
AuthorityDiscoveryId
;
...
...
This diff is collapsed.
Click to expand it.
node/src/chain_spec/gtest.rs
+
7
−
11
View file @
b8960000
...
@@ -20,14 +20,14 @@ use common_runtime::entities::IdtyData;
...
@@ -20,14 +20,14 @@ use common_runtime::entities::IdtyData;
use
common_runtime
::
*
;
use
common_runtime
::
*
;
use
gtest_genesis
::{
build_genesis
,
GenesisJson
};
use
gtest_genesis
::{
build_genesis
,
GenesisJson
};
use
gtest_runtime
::{
use
gtest_runtime
::{
opaque
::
SessionKeys
,
AccountConfig
,
AccountId
,
AuthorityMembersConfig
,
BabeConfig
,
CertConfig
,
opaque
::
SessionKeys
,
AccountConfig
,
AccountId
,
AuthorityMembersConfig
,
BabeConfig
,
GenesisConfig
,
IdentityConfig
,
ImOnlineId
,
MembershipConfig
,
SessionConfig
,
SmithCertConfig
,
BalancesConfig
,
CertConfig
,
GenesisConfig
,
IdentityConfig
,
ImOnlineId
,
MembershipConfig
,
SmithMembershipConfig
,
SudoConfig
,
SystemConfig
,
TechnicalCommitteeConfig
,
SessionConfig
,
SmithCertConfig
,
SmithMembershipConfig
,
SudoConfig
,
SystemConfig
,
UniversalDividendConfig
,
WASM_BINARY
,
TechnicalCommitteeConfig
,
UniversalDividendConfig
,
WASM_BINARY
,
};
};
use
jsonrpsee
::
core
::
JsonValue
;
use
jsonrpsee
::
core
::
JsonValue
;
use
sc_consensus_grandpa
::
AuthorityId
as
GrandpaId
;
use
sc_consensus_grandpa
::
AuthorityId
as
GrandpaId
;
use
sc_network
_common
::
config
::
MultiaddrWithPeerId
;
// in the future available in sc_network::config
use
sc_network
::
config
::
MultiaddrWithPeerId
;
use
sc_service
::
ChainType
;
use
sc_service
::
ChainType
;
use
sc_telemetry
::
TelemetryEndpoints
;
use
sc_telemetry
::
TelemetryEndpoints
;
use
serde
::
Deserialize
;
use
serde
::
Deserialize
;
...
@@ -272,6 +272,7 @@ fn generate_genesis(
...
@@ -272,6 +272,7 @@ fn generate_genesis(
assert!
(
initial_authorities_len
<=
initial_smiths_len
);
assert!
(
initial_authorities_len
<=
initial_smiths_len
);
let
ud
=
1_000
;
let
ud
=
1_000
;
let
monetary_mass
=
initial_identities_len
as
u64
*
ud
;
let
initial_smiths
=
(
0
..
initial_smiths_len
)
let
initial_smiths
=
(
0
..
initial_smiths_len
)
.map
(|
i
|
get_authority_keys_from_seed
(
NAMES
[
i
]))
.map
(|
i
|
get_authority_keys_from_seed
(
NAMES
[
i
]))
...
@@ -316,12 +317,7 @@ fn generate_genesis(
...
@@ -316,12 +317,7 @@ fn generate_genesis(
},
},
// Necessary to initialize TotalIssuence
// Necessary to initialize TotalIssuence
balances
:
BalancesConfig
{
balances
:
BalancesConfig
{
// FIXME
total_issuance
:
monetary_mass
,
balances
:
initial_identities
.iter
()
.enumerate
()
.map
(|(
_
,
(
_
,
key
))|
(
key
.clone
(),
first_ud
))
.collect
(),
},
},
babe
:
BabeConfig
{
babe
:
BabeConfig
{
authorities
:
Vec
::
with_capacity
(
0
),
authorities
:
Vec
::
with_capacity
(
0
),
...
...
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