Skip to content

excluded smith with non-null expires_on

smithMembers.smith(12950) (JosselinFERREIRA) at block 0xf2d516e2c0cd23e98b72a865906446745660afcd17f264c1bd39fbf36eed6abb (1,950,000) returns:

{
  status: Excluded
  expiresOn: 3,644
  issuedCerts: [
    61
    1,401
    5,715
  ]
  receivedCerts: []
}

I wonder how he could get Excluded status while still having non-null expiresOn because:

fn _do_exclude_smith(receiver: T::IdtyIndex, reason: SmithRemovalReason) {
    let mut lost_certs = vec![];
    Smiths::<T>::mutate(receiver, |maybe_smith_meta| {
        if let Some(smith_meta) = maybe_smith_meta {
            smith_meta.expires_on = None;                  // <---------- should be set to None
            smith_meta.status = SmithStatus::Excluded;
            for cert in &smith_meta.received_certs {
                lost_certs.push(*cert);
            }
            smith_meta.received_certs = vec![];
            // N.B.: the issued certs are kept in case the smith joins back
        }
    });
}

The problem is not visible anymore on current data but it would be nice to investigate and see if there is a bug hiding somewhere. This could also simply be linked to a runtime upgrade without migrating data.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information