Fix update_lock (#10485)

* Fix update_lock

* Fixes

* Formatting

* add `inc_consumers_without_limits` to session too

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Gavin Wood
2021-12-15 01:27:13 +01:00
committed by GitHub
parent 1d3b51361a
commit 7ee25416c2
4 changed files with 56 additions and 11 deletions
+1 -1
View File
@@ -971,7 +971,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
} else {
Locks::<T, I>::insert(who, bounded_locks);
if !existed {
if system::Pallet::<T>::inc_consumers(who).is_err() {
if system::Pallet::<T>::inc_consumers_without_limit(who).is_err() {
// No providers for the locks. This is impossible under normal circumstances
// since the funds that are under the lock will themselves be stored in the
// account and therefore will need a reference.