Skip to content

Commit bec4749

Browse files
committed
fix points u64 to f64
1 parent 6e562f6 commit bec4749

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Cargo.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ default-members = ["compute"]
77

88
[workspace.package]
99
edition = "2021"
10-
version = "0.4.1"
10+
version = "0.4.2"
1111
license = "Apache-2.0"
1212
readme = "README.md"
1313

compute/src/node/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub struct DriaComputeNode {
5151
/// Specifications collector.
5252
spec_collector: SpecCollector,
5353
/// Initial steps count.
54-
initial_steps: u64,
54+
initial_steps: f64,
5555
}
5656

5757
impl DriaComputeNode {

compute/src/utils/points.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub struct DriaPoints {
1010
/// Indicates in which top percentile your points are.
1111
pub percentile: u64,
1212
/// The total number of points you have accumulated.
13-
pub score: u64,
13+
pub score: f64,
1414
}
1515

1616
// the API returns a stringified number due to frontend issues, so we need to parse it
@@ -56,6 +56,6 @@ mod tests {
5656
let steps = get_points("0xa43536a6032a3907ccf60e8109429ee1047b207c")
5757
.await
5858
.unwrap();
59-
assert!(steps.score != 0);
59+
assert!(steps.score != 0.0);
6060
}
6161
}

0 commit comments

Comments
 (0)