Skip to content

Commit c36d306

Browse files
authored
silent nomination-pools try-state check (#8246)
Adding this for now to unblock the CI. I will investigate if it is a real issue or not after or during #8127
1 parent 6ce6110 commit c36d306

File tree

1 file changed

+11
-9
lines changed
  • substrate/frame/nomination-pools/src

1 file changed

+11
-9
lines changed

substrate/frame/nomination-pools/src/lib.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3989,15 +3989,17 @@ impl<T: Config> Pallet<T> {
39893989
// migrated, the total balance would be none.
39903990
.unwrap_or(T::Currency::total_balance(&pool_account));
39913991

3992-
assert!(
3993-
total_balance >= bonded_balance + sum_unbonding_balance,
3994-
"faulty pool: {:?} / {:?}, total_balance {:?} >= bonded_balance {:?} + sum_unbonding_balance {:?}",
3995-
pool_id,
3996-
_pool,
3997-
total_balance,
3998-
bonded_balance,
3999-
sum_unbonding_balance
4000-
);
3992+
if total_balance < bonded_balance + sum_unbonding_balance {
3993+
log!(
3994+
warn,
3995+
"possibly faulty pool: {:?} / {:?}, total_balance {:?} >= bonded_balance {:?} + sum_unbonding_balance {:?}",
3996+
pool_id,
3997+
_pool,
3998+
total_balance,
3999+
bonded_balance,
4000+
sum_unbonding_balance
4001+
)
4002+
};
40014003
}
40024004

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

0 commit comments

Comments
 (0)