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
615f3f57
Commit
615f3f57
authored
2 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
fix(wot): membership revocation should not trigger identity removal
parent
012d096f
No related branches found
No related tags found
1 merge request
!61
fix(wot): Identity should be removed after the consumers of the identity & membership revocation should not trigger identity removal
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pallets/duniter-wot/src/lib.rs
+4
-12
4 additions, 12 deletions
pallets/duniter-wot/src/lib.rs
with
4 additions
and
12 deletions
pallets/duniter-wot/src/lib.rs
+
4
−
12
View file @
615f3f57
...
...
@@ -222,10 +222,6 @@ where
}
sp_membership
::
Event
::
<
IdtyIndex
,
MetaData
>
::
MembershipExpired
(
idty_index
)
|
sp_membership
::
Event
::
<
IdtyIndex
,
MetaData
>
::
MembershipRevoked
(
idty_index
)
=>
{
Self
::
dispath_idty_call
(
pallet_identity
::
Call
::
remove_identity
{
idty_index
:
*
idty_index
,
idty_name
:
None
,
});
if
!
T
::
IsSubWot
::
get
()
{
WotDiffs
::
<
T
,
I
>
::
append
(
WotDiff
::
DisableNode
(
*
idty_index
));
}
...
...
@@ -339,14 +335,10 @@ impl<T: Config<I>, I: 'static> pallet_certification::traits::OnRemovedCert<IdtyI
&&
pallet_membership
::
Pallet
::
<
T
,
I
>
::
is_member
(
&
receiver
)
{
// Revoke receiver membership and disable their identity
if
let
Err
(
e
)
=
pallet_membership
::
Pallet
::
<
T
,
I
>
::
revoke_membership
(
RawOrigin
::
Root
.into
(),
Some
(
receiver
),
)
{
sp_std
::
if_std!
{
println!
(
"fail to revoke membership: {:?}"
,
e
)
}
}
Self
::
dispath_idty_call
(
pallet_identity
::
Call
::
remove_identity
{
idty_index
:
receiver
,
idty_name
:
None
,
});
}
if
!
T
::
IsSubWot
::
get
()
{
WotDiffs
::
<
T
,
I
>
::
append
(
WotDiff
::
DelLink
(
issuer
,
receiver
));
...
...
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