Skip to content

Commit

Permalink
AUDIT: L-01 Router does one less iteration than it should (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
coachchucksol authored Jan 16, 2025
1 parent d1ed0bb commit a10a74e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/base_reward_router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl BaseRewardRouter {
.checked_add(1)
.ok_or(TipRouterError::ArithmeticOverflow)?;

if iterations >= max_iterations {
if iterations > max_iterations {
msg!(
"Reached max iterations, saving state and exiting {}/{}",
group_index,
Expand Down
2 changes: 1 addition & 1 deletion core/src/ncn_reward_router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl NcnRewardRouter {
.checked_add(1)
.ok_or(TipRouterError::ArithmeticOverflow)?;

if iterations >= max_iterations {
if iterations > max_iterations {
msg!(
"Reached max iterations, saving state and exiting {}/{}",
rewards_to_process,
Expand Down

0 comments on commit a10a74e

Please sign in to comment.