mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 00:01:03 +00:00
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:
committed by
GitHub
parent
f93d7b874e
commit
9a72134188
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user