Found on commit: 16bd9e56d20c206cf927d961c8ec58f299308473 Location:
● pallets/parachain-staking/src/rewards/mint_rewards.rs: 50-55 Classification:
● CWE-778: Insufficient Logging3
If funds are not deposited for the collator when making a new block, the error is not
registered anywhere. This can be seen in the following code, where there is no else clause
if let Ok(amount_transferred) = T::Currency::deposit_into_existing(&collator_id, amt) { Self::deposit_event(Event::Rewarded {
account: collator_id.clone(),
rewards: amount_transferred.peek(), });
}
Recommendation: Either generate an event showing the error or at least log the error.
Description
Found on commit: 16bd9e56d20c206cf927d961c8ec58f299308473 Location: ● pallets/parachain-staking/src/rewards/mint_rewards.rs: 50-55 Classification: ● CWE-778: Insufficient Logging3 If funds are not deposited for the collator when making a new block, the error is not registered anywhere. This can be seen in the following code, where there is no else clause
Recommendation: Either generate an event showing the error or at least log the error.
ACCEPTANCE: