Resolve "PromotedToSmith is issued even for Smith"
Closes #176 (closed)
Merge request reports
Activity
Filter activity
changed milestone to %runtime-800
added C-runtime ET-days P2-asap RN-runtime labels
assigned to @c-geek
added 2 commits
- 994e6b61 - test(#176 (closed)): reveal bug
- b2927590 - fix(#176 (closed)): avoid emitting SmithMembershipAdded twice
- Resolved by Cédric Moreau
requested review from @HugoTrentesaux
- Resolved by Hugo Trentesaux
- Resolved by Hugo Trentesaux
- Resolved by Cédric Moreau
added 4 commits
-
d029e10c - 1 commit from branch
master
- 6f5da008 - test(#176 (closed)): reveal bug
- 3c73c16d - fix(#176 (closed)): avoid emitting SmithMembershipAdded twice
- 00972dea - fix(#176 (closed)): review: comment
Toggle commit list-
d029e10c - 1 commit from branch
added 5 commits
- 5879b057 - test(#176 (closed)): reveal that a ceritification on a online smith is bugged
- 5cfcee7d - fix(#176 (closed)): expiration should be postponed only for Pending smiths
- 7ed8892a - refac(#176 (closed)): move SmithCertAdded event closer to its storage updates + add docs
- 8242c0af - test(#176 (closed)): show that ExpiresOn is not correctly updated for Pending smiths
- 13c6b2c5 - fix(#176 (closed)): ExpiresOn is now correctly updated for Pending smiths
Toggle commit list454 // - otherwise we are (still) a pending smith 447 455 SmithStatus::Pending 448 456 }; 449 // expiry postponed 450 let new_expires_on = 451 CurrentSession::<T>::get() + T::SmithInactivityMaxDuration::get(); 452 smith_meta.expires_on = Some(new_expires_on); 453 Self::deposit_event(Event::<T>::SmithCertAdded { receiver, issuer }); 454 if smith_meta.status == SmithStatus::Smith { 457 458 if smith_meta.status == SmithStatus::Pending { 459 // - postpone the expiration: a Pending smith cannot do anything but wait 460 // this postponement is here to ease the process of becoming a smith 461 let new_expires_on = 462 CurrentSession::<T>::get() + T::SmithInactivityMaxDuration::get(); 463 smith_meta.expires_on = Some(new_expires_on); - Comment on lines +461 to +463
With this implementation, the last certification does not postpone expiration. So the third certification and the
go_online
have to be submitted in the 48 sessions (2 days with the current setting) within the period after the second certification. We might want to set this a bit longer for confort.
added 2 commits
- b5d211c7 - test(#176 (closed)): reveal that last smith certification does not postpone expiry
- 8a578852 - fix(#176 (closed)): last certification does postpone expiry
mentioned in commit ad20da54
Please register or sign in to reply