Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions substrate/frame/nomination-pools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3989,15 +3989,17 @@ impl<T: Config> Pallet<T> {
// migrated, the total balance would be none.
.unwrap_or(T::Currency::total_balance(&pool_account));

assert!(
total_balance >= bonded_balance + sum_unbonding_balance,
"faulty pool: {:?} / {:?}, total_balance {:?} >= bonded_balance {:?} + sum_unbonding_balance {:?}",
pool_id,
_pool,
total_balance,
bonded_balance,
sum_unbonding_balance
);
if total_balance < bonded_balance + sum_unbonding_balance {
log!(
warn,
"possibly faulty pool: {:?} / {:?}, total_balance {:?} >= bonded_balance {:?} + sum_unbonding_balance {:?}",
pool_id,
_pool,
total_balance,
bonded_balance,
sum_unbonding_balance
)
};
}

// Warn if any pool has incorrect ED frozen. We don't want to fail hard as this could be a
Expand Down
Loading