Skip to content

Commit 5ed9861

Browse files
committed
fix get_state grpc call
1 parent f0bc9b8 commit 5ed9861

File tree

15 files changed

+93
-80
lines changed

15 files changed

+93
-80
lines changed

Cargo.lock

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace.package]
2-
version = "3.0.0-pre.1"
2+
version = "3.0.0-pre.2"
33
edition = "2021"
44
authors = ["The Tari Development Community"]
55
repository = "https://github.com/tari-project/tari"

applications/minotari_ledger_wallet/comms/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "minotari_ledger_wallet_comms"
3-
version = "3.0.0-pre.1"
3+
version = "3.0.0-pre.2"
44
authors = ["The Tari Development Community"]
55
license = "BSD-3-Clause"
66
edition = "2021"

applications/minotari_ledger_wallet/wallet/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

applications/minotari_ledger_wallet/wallet/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "minotari_ledger_wallet"
3-
version = "3.0.0-pre.1"
3+
version = "3.0.0-pre.2"
44
authors = ["The Tari Development Community"]
55
license = "BSD-3-Clause"
66
edition = "2021"

applications/minotari_miner/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = ["The Tari Development Community"]
44
description = "The tari miner implementation"
55
repository = "https://github.com/tari-project/tari"
66
license = "BSD-3-Clause"
7-
version = "3.0.0-pre.1"
7+
version = "3.0.0-pre.2"
88
edition = "2018"
99

1010
[dependencies]

applications/minotari_node/src/grpc/base_node_grpc_server.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer {
426426
obscure_error_if_true(report_error_flag, Status::internal(e.to_string()))
427427
})?;
428428
let target_time = constants.pow_target_block_interval(PowAlgorithm::Sha3x);
429-
let estimated_hash_rate = target_difficulty.as_u64().saturating_sub(target_time);
429+
let estimated_hash_rate = target_difficulty.as_u64().checked_div(target_time).unwrap_or(0);
430430
self.data_cache
431431
.set_sha3x_estimated_hash_rate(estimated_hash_rate, *metadata.best_block_hash())
432432
.await;
@@ -452,7 +452,7 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer {
452452
obscure_error_if_true(report_error_flag, Status::internal(e.to_string()))
453453
})?;
454454
let target_time = constants.pow_target_block_interval(PowAlgorithm::RandomXM);
455-
let estimated_hash_rate = target_difficulty.as_u64().saturating_sub(target_time);
455+
let estimated_hash_rate = target_difficulty.as_u64().checked_div(target_time).unwrap_or(0);
456456
self.data_cache
457457
.set_monero_randomx_estimated_hash_rate(estimated_hash_rate, *metadata.best_block_hash())
458458
.await;
@@ -479,7 +479,7 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer {
479479
obscure_error_if_true(report_error_flag, Status::internal(e.to_string()))
480480
})?;
481481
let target_time = constants.pow_target_block_interval(PowAlgorithm::RandomXT);
482-
let estimated_hash_rate = target_difficulty.as_u64().saturating_sub(target_time);
482+
let estimated_hash_rate = target_difficulty.as_u64().checked_div(target_time).unwrap_or(0);
483483
self.data_cache
484484
.set_tari_randomx_estimated_hash_rate(estimated_hash_rate, *metadata.best_block_hash())
485485
.await;

base_layer/contacts/src/chat_client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "tari_chat_client"
33
authors = ["The Tari Development Community"]
44
description = "Tari cucumber chat client"
55
license = "BSD-3-Clause"
6-
version = "3.0.0-pre.1"
6+
version = "3.0.0-pre.2"
77

88
edition = "2018"
99

changelog-development.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [3.0.0-pre.2](https://github.com/tari-project/tari/compare/v3.0.0-pre.1...v3.0.0-pre.2) (2025-05-21)
6+
7+
### Bug Fixes
8+
9+
* fix bad fix in node estimate hash rate
10+
511
## [3.0.0-pre.1](https://github.com/tari-project/tari/compare/v3.0.0-pre.0...v3.0.0-pre.1) (2025-05-21)
612

713

0 commit comments

Comments
 (0)