From e8fa392f6e989ed33231cfe0e6e9e4b7c4c36ee4 Mon Sep 17 00:00:00 2001 From: Benjamin Kolb Date: Fri, 15 Mar 2019 14:34:00 +0100 Subject: [PATCH] fix: PR feedback --- runtime/src/attestation.rs | 2 +- runtime/src/delegation.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/src/attestation.rs b/runtime/src/attestation.rs index bde876379..2448d7219 100644 --- a/runtime/src/attestation.rs +++ b/runtime/src/attestation.rs @@ -69,7 +69,7 @@ decl_module! { let mut existing_attestations_for_claim = >::get(claim_hash.clone()); for v in existing_attestations_for_claim.iter_mut() { if !v.3 { - if v.1.eq(&sender) && !v.3 { + if v.1.eq(&sender) { last_attested = true; v.3 = true; } else { diff --git a/runtime/src/delegation.rs b/runtime/src/delegation.rs index 4d152d132..34c3827fd 100644 --- a/runtime/src/delegation.rs +++ b/runtime/src/delegation.rs @@ -129,7 +129,7 @@ decl_module! { return Err("not permitted to revoke") } if !r.2 { - r.2 = false; + r.2 = true; >::insert(root_id.clone(), r); Self::revoke_children(&root_id); } @@ -172,7 +172,7 @@ impl Module { fn revoke(delegation: &T::DelegationNodeId) { let mut d = >::get(delegation.clone()); if !d.4 { - d.4 = false; + d.4 = true; >::insert(delegation.clone(), d); Self::revoke_children(delegation); }