Skip to content

Commit c019cc2

Browse files
authored
miner timing resolution (mimblewimble#351)
1 parent 2f09d2e commit c019cc2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

grin.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ burn_reward = false
150150
#slower.
151151
[[mining.cuckoo_miner_plugin_config]]
152152
type_filter = "mean_compat_cpu"
153-
parameter_list = {NUM_THREADS=4, NUM_TRIMS=68}
153+
parameter_list = {NUM_THREADS=1, NUM_TRIMS=68}
154154

155155
#note lean_cpu currently has a bug which prevents it from
156156
#working with threads > 1

grin/src/miner.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl Miner {
207207
let stats = job_handle.get_stats(i);
208208
if let Ok(stat_vec) = stats {
209209
for s in stat_vec {
210-
let last_solution_time_secs = s.last_solution_time as f64 / 1000.0;
210+
let last_solution_time_secs = s.last_solution_time as f64 / 1000000000.0;
211211
let last_hashes_per_sec = 1.0 / last_solution_time_secs;
212212
debug!(
213213
LOGGER,
@@ -299,7 +299,7 @@ impl Miner {
299299
if time::get_time().sec >= next_stat_check {
300300
let stats_vec = plugin_miner.get_stats(0).unwrap();
301301
for s in stats_vec.into_iter() {
302-
let last_solution_time_secs = s.last_solution_time as f64 / 1000.0;
302+
let last_solution_time_secs = s.last_solution_time as f64 / 1000000000.0;
303303
let last_hashes_per_sec = 1.0 / last_solution_time_secs;
304304
debug!(
305305
LOGGER,

pow/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ grin_util = { path = "../util" }
1818

1919
[dependencies.cuckoo_miner]
2020
git = "https://github.com/mimblewimble/cuckoo-miner"
21-
tag="grin_integration_15"
21+
tag="grin_integration_16"
2222
#path = "../../cuckoo-miner"
2323
#uncomment this feature to turn off plugin builds
2424
#features=["no-plugin-build"]

0 commit comments

Comments
 (0)