Skip to content

Commit

Permalink
Ensure that scan progress can't exceed 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
nuttycom committed Oct 8, 2024
1 parent e2ce60e commit 66c0425
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/ZcashLightClientKit/Rust/ZcashRustBackend.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ extension FfiScanProgress {
/// Converts an [`FfiScanProgress`] into a [`ScanProgress`].
func toScanProgress() -> ScanProgress {
.init(
numerator: self.numerator,
numerator: min(self.numerator, self.denominator),
denominator: self.denominator
)
}
Expand Down

0 comments on commit 66c0425

Please sign in to comment.