fn mutate_liquidation_attempts(
		liquidated_pool_id: CurrencyId,
		borrower: &T::AccountId,
		is_partial_liquidation: bool,
	) {
		// partial_liquidation -> liquidation_attempts += 1
		// complete_liquidation -> liquidation_attempts = 0
		liquidity_pools::PoolUserParams::<T>::mutate(liquidated_pool_id, &borrower, |p| {
			if is_partial_liquidation {
				p.liquidation_attempts += u8::one();
			} else {
				p.liquidation_attempts = u8::zero();
			}
		})
	}
/// Changes the parameter liquidation_attempts depending on the type of liquidation.
///
/// - `liquidated_pool_id`: the CurrencyId of the pool with loan, for which automatic.
/// - `borrower`: the borrower in automatic liquidation.
/// - `is_partial_liquidation`: partial or complete liquidation.
Changes the parameter liquidation_attempts depending on the type of liquidation.
`liquidated_pool_id`: the CurrencyId of the pool with loan, for which automatic.
`borrower`: the borrower in automatic liquidation.
`is_partial_liquidation`: partial or complete liquidation.
Changes the parameter liquidation_attempts depending on the type of liquidation . ` liquidated_pool_id ` : the CurrencyId of the pool with loan for which automatic . ` borrower ` : the borrower in automatic liquidation . ` is_partial_liquidation ` : partial or complete liquidation .
fn mutate_liquidation_attempts(
		liquidated_pool_id: CurrencyId,
		borrower: &T::AccountId,
		is_partial_liquidation: bool,
	) {
		// partial_liquidation -> liquidation_attempts += 1
		// complete_liquidation -> liquidation_attempts = 0
		liquidity_pools::PoolUserParams::<T>::mutate(liquidated_pool_id, &borrower, |p| {
			if is_partial_liquidation {
				p.liquidation_attempts += u8::one();
			} else {
				p.liquidation_attempts = u8::zero();
			}
		})
	}
fn mutate_liquidation_attempts ( liquidated_pool_id : CurrencyId , borrower : & T :: AccountId , is_partial_liquidation : bool , ) { // partial_liquidation -> liquidation_attempts += 1 // complete_liquidation -> liquidation_attempts = 0 liquidity_pools :: PoolUserParams :: < T > :: mutate ( liquidated_pool_id , & borrower , | p | { if is_partial_liquidation { p . liquidation_attempts += u8 :: one ( ) ; } else { p . liquidation_attempts = u8 :: zero ( ) ; } } ) }
Changes the parameter liquidation_attempts depending on the type of liquidation.
Changes the parameter liquidation_attempts depending on the type of liquidation .
liquidated_pool_id
CurrencyId
borrower
&T::AccountId
is_partial_liquidation
bool
liquidated_pool_id
CurrencyId
borrower
&T::AccountId
is_partial_liquidation
bool