mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 22:11:01 +00:00
FRAME: Minor fix for failsafe. (#13741)
* max instead of min * Remove debug stuff * remove debug code * warn log on no provider ref * format string for log --------- Co-authored-by: muharem <ismailov.m.h@gmail.com>
This commit is contained in:
@@ -786,7 +786,12 @@ pub mod pallet {
|
||||
// Gah!! We have a non-zero reserve balance but no provider refs :(
|
||||
// This shouldn't practically happen, but we need a failsafe anyway: let's give
|
||||
// them enough for an ED.
|
||||
a.free = a.free.min(Self::ed());
|
||||
log::warn!(
|
||||
target: LOG_TARGET,
|
||||
"account with a non-zero reserve balance has no provider refs, account_id: '{:?}'.",
|
||||
who
|
||||
);
|
||||
a.free = a.free.max(Self::ed());
|
||||
system::Pallet::<T>::inc_providers(who);
|
||||
}
|
||||
let _ = system::Pallet::<T>::inc_consumers(who).defensive();
|
||||
|
||||
Reference in New Issue
Block a user