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
e01bc04b
Commit
e01bc04b
authored
3 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
style: apply fmt & fix clippy warnings
parent
7ed0dd2a
No related branches found
No related tags found
1 merge request
!28
Smiths sub-wot
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pallets/authority-members/src/tests.rs
+2
-2
2 additions, 2 deletions
pallets/authority-members/src/tests.rs
runtime/common/src/lib.rs
+3
-3
3 additions, 3 deletions
runtime/common/src/lib.rs
with
5 additions
and
5 deletions
pallets/authority-members/src/tests.rs
+
2
−
2
View file @
e01bc04b
...
@@ -115,13 +115,13 @@ fn test_max_keys_life_rule() {
...
@@ -115,13 +115,13 @@ fn test_max_keys_life_rule() {
assert_eq!
(
AuthorityMembers
::
online
(),
vec!
[
3
,
6
]);
assert_eq!
(
AuthorityMembers
::
online
(),
vec!
[
3
,
6
]);
assert_eq!
(
AuthorityMembers
::
member
(
9
),
None
);
assert_eq!
(
AuthorityMembers
::
member
(
9
),
None
);
// Member 9 should be "deprogrammed" but still in the authorities set for 1 session
// Member 9 should be "deprogrammed" but still in the authorities set for 1 session
assert_eq!
(
Session
::
queued_keys
()
.len
(),
2
);
assert_eq!
(
Session
::
queued_keys
()
.len
(),
2
);
assert_eq!
(
Session
::
queued_keys
()[
0
]
.0
,
3
);
assert_eq!
(
Session
::
queued_keys
()[
0
]
.0
,
3
);
assert_eq!
(
Session
::
queued_keys
()[
1
]
.0
,
6
);
assert_eq!
(
Session
::
queued_keys
()[
1
]
.0
,
6
);
assert_eq!
(
Session
::
validators
(),
vec!
[
3
,
6
,
9
]);
assert_eq!
(
Session
::
validators
(),
vec!
[
3
,
6
,
9
]);
// Member 9 should be **effectively** out at session 6
// Member 9 should be **effectively** out at session 6
run_to_block
(
31
);
run_to_block
(
31
);
assert_eq!
(
Session
::
current_index
(),
6
);
assert_eq!
(
Session
::
current_index
(),
6
);
assert_eq!
(
Session
::
validators
(),
vec!
[
3
,
6
]);
assert_eq!
(
Session
::
validators
(),
vec!
[
3
,
6
]);
...
...
This diff is collapsed.
Click to expand it.
runtime/common/src/lib.rs
+
3
−
3
View file @
e01bc04b
...
@@ -107,9 +107,9 @@ macro_rules! declare_session_keys {
...
@@ -107,9 +107,9 @@ macro_rules! declare_session_keys {
#[derive(Clone,
codec::Decode,
Debug,
codec::Encode,
Eq,
PartialEq)]
#[derive(Clone,
codec::Decode,
Debug,
codec::Encode,
Eq,
PartialEq)]
pub
struct
SessionKeysWrapper
(
pub
SessionKeys
);
pub
struct
SessionKeysWrapper
(
pub
SessionKeys
);
impl
Into
<
SessionKeys
>
for
SessionKeys
Wrapper
{
impl
From
<
SessionKeys
Wrapper
>
for
SessionKeys
{
fn
into
(
self
)
->
SessionKeys
{
fn
from
(
keys_wrapper
:
SessionKeysWrapper
)
->
SessionKeys
{
self
.0
keys_wrapper
.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