Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl DistributionFunction {
z = z ^ (z >> 31);

// Calculate the range size: (max - min + 1)
let range = max.wrapping_sub(*min).wrapping_add(1);
let range = max.saturating_sub(*min).saturating_add(1);

// Map the pseudorandom number into the desired range.
let value = min.wrapping_add(z % range);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ pub enum DistributionFunction {
/// f(x) = n * (1 - (decrease_per_interval_numerator / decrease_per_interval_denominator))^((x - s) / step_count)
/// ```
///
/// For `x <= s`, `f(x) = n`
///
/// # Parameters
/// - `step_count`: The number of periods between each step.
/// - `decrease_per_interval_numerator` and `decrease_per_interval_denominator`: Define the reduction factor per step.
Expand Down
1 change: 0 additions & 1 deletion packages/rs-drive-abci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ assert_matches = "1.5.0"
drive-abci = { path = ".", features = ["testing-config", "mocks"] }
bls-signatures = { git = "https://github.com/dashpay/bls-signatures", tag = "1.3.3" }
mockall = { version = "0.13" }

# For tests of grovedb verify
rocksdb = { version = "0.23.0" }
integer-encoding = { version = "4.0.0" }
Expand Down
Loading