Skip to content

Commit 477a688

Browse files
fix(nns): remove unsafe math from node_provider_rewards (#6825)
<[Previous PR](https://github.com/dfinity/ic/pull/6796)|
1 parent e85afdb commit 477a688

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rs/nns/governance/src/node_provider_rewards.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ pub(crate) fn latest_node_provider_rewards() -> Option<ArchivedMonthlyNodeProvid
4343
if len == 0 {
4444
return None;
4545
}
46+
// Since len > 0, len - 1 will not underflow.
4647
log.get(len - 1)
4748
})
4849
}

0 commit comments

Comments
 (0)