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
e45d6283
Commit
e45d6283
authored
2 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
clippy
parent
2a6d3290
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request
!50
. Comments created here will be created in the context of that merge request.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
end2end-tests/tests/cucumber_tests.rs
+5
-5
5 additions, 5 deletions
end2end-tests/tests/cucumber_tests.rs
node/src/chain_spec/gen_genesis_data.rs
+2
-4
2 additions, 4 deletions
node/src/chain_spec/gen_genesis_data.rs
with
7 additions
and
9 deletions
end2end-tests/tests/cucumber_tests.rs
+
5
−
5
Edit
View file @
e45d6283
...
...
@@ -122,7 +122,7 @@ async fn who_have(world: &mut DuniterWorld, who: String, amount: u64, unit: Stri
}
// Create {amount} ĞD for {who}
common
::
balances
::
set_balance
(
&
world
.api
(),
&
world
.client
(),
who
,
amount
)
.await
?
;
common
::
balances
::
set_balance
(
world
.api
(),
world
.client
(),
who
,
amount
)
.await
?
;
Ok
(())
}
...
...
@@ -130,7 +130,7 @@ async fn who_have(world: &mut DuniterWorld, who: String, amount: u64, unit: Stri
#[when(regex
=
r"(\d+) blocks? later"
)]
async
fn
n_blocks_later
(
world
:
&
mut
DuniterWorld
,
n
:
usize
)
->
Result
<
()
>
{
for
_
in
0
..
n
{
common
::
create_empty_block
(
&
world
.client
())
.await
?
;
common
::
create_empty_block
(
world
.client
())
.await
?
;
}
Ok
(())
}
...
...
@@ -149,9 +149,9 @@ async fn transfer(
let
(
amount
,
is_ud
)
=
parse_amount
(
amount
,
&
unit
);
if
is_ud
{
common
::
balances
::
transfer_ud
(
&
world
.api
(),
&
world
.client
(),
from
,
amount
,
to
)
.await
common
::
balances
::
transfer_ud
(
world
.api
(),
world
.client
(),
from
,
amount
,
to
)
.await
}
else
{
common
::
balances
::
transfer
(
&
world
.api
(),
&
world
.client
(),
from
,
amount
,
to
)
.await
common
::
balances
::
transfer
(
world
.api
(),
world
.client
(),
from
,
amount
,
to
)
.await
}
}
...
...
@@ -161,7 +161,7 @@ async fn send_all_to(world: &mut DuniterWorld, from: String, to: String) -> Resu
let
from
=
AccountKeyring
::
from_str
(
&
from
)
.expect
(
"unknown from"
);
let
to
=
AccountKeyring
::
from_str
(
&
to
)
.expect
(
"unknown to"
);
common
::
balances
::
transfer_all
(
&
world
.api
(),
&
world
.client
(),
from
,
to
)
.await
common
::
balances
::
transfer_all
(
world
.api
(),
world
.client
(),
from
,
to
)
.await
}
#[then(regex
=
r"([a-zA-Z]+) should have (\d+) ĞD"
)]
...
...
This diff is collapsed.
Click to expand it.
node/src/chain_spec/gen_genesis_data.rs
+
2
−
4
Edit
View file @
e45d6283
...
...
@@ -257,7 +257,7 @@ where
// Initial authorities
if
maybe_force_authority
.is_some
()
{
if
smith_data
.session_keys
.is_some
()
{
return
Err
(
format!
(
"session_keys field forbidden"
,
));
return
Err
(
"session_keys field forbidden"
.to_owned
(
));
}
if
*
idty_index
==
1
{
initial_authorities
.insert
(
1
,
(
identity
.pubkey
.clone
(),
true
));
...
...
@@ -312,9 +312,7 @@ where
}
if
maybe_force_authority
.is_none
()
&&
online_authorities_counter
==
0
{
return
Err
(
format!
(
"The session_keys field must be filled in for at least one smith."
,
));
return
Err
(
"The session_keys field must be filled in for at least one smith."
.to_owned
());
}
let
genesis_data
=
GenesisData
{
...
...
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