Check unreserve and transfer returnvalues in debug code (#8398)

* Check `unreserve` and `transfer` returnvalues in debug code

fixes #8106

* few more

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Falco Hirschenberger
2021-03-24 18:35:05 +01:00
committed by GitHub
parent f93d7b874e
commit 9a72134188
13 changed files with 66 additions and 34 deletions
+4 -2
View File
@@ -394,7 +394,8 @@ impl<T: Config> VestingSchedule<T::AccountId> for Pallet<T> where
};
Vesting::<T>::insert(who, vesting_schedule);
// it can't fail, but even if somehow it did, we don't really care.
let _ = Self::update_lock(who.clone());
let res = Self::update_lock(who.clone());
debug_assert!(res.is_ok());
Ok(())
}
@@ -402,7 +403,8 @@ impl<T: Config> VestingSchedule<T::AccountId> for Pallet<T> where
fn remove_vesting_schedule(who: &T::AccountId) {
Vesting::<T>::remove(who);
// it can't fail, but even if somehow it did, we don't really care.
let _ = Self::update_lock(who.clone());
let res = Self::update_lock(who.clone());
debug_assert!(res.is_ok());
}
}