Mining tui updates (#3584)

* add column ordering, set mining workers table to sort the connected workers to the top by default

* add column ordering, set mining workers table to sort the connected workers to the top by default

* Mining TUI fixes and updates
This commit is contained in:
Blade Doyle
2021-03-04 06:39:14 -08:00
committed by GitHub
parent 64b2fddbf1
commit 059e6ad545
3 changed files with 55 additions and 63 deletions
+7 -1
View File
@@ -130,8 +130,12 @@ pub struct StratumStats {
pub network_difficulty: u64,
/// cuckoo size of last share submitted
pub edge_bits: u16,
/// Number of blocks found by all workers
pub blocks_found: u16,
/// current network Hashrate (for edge_bits)
pub network_hashrate: f64,
/// The minimum acceptable share difficulty to request from miners
pub minimum_share_difficulty: u64,
/// Individual worker status
pub worker_stats: Vec<WorkerStats>,
}
@@ -271,8 +275,10 @@ impl Default for StratumStats {
num_workers: 0,
block_height: 0,
network_difficulty: 0,
edge_bits: 0,
edge_bits: 32,
blocks_found: 0,
network_hashrate: 0.0,
minimum_share_difficulty: 1,
worker_stats: Vec::new(),
}
}
+2 -1
View File
@@ -714,7 +714,7 @@ impl WorkersList {
let mut worker_stats = WorkerStats::default();
worker_stats.is_connected = true;
worker_stats.id = worker_id.to_string();
worker_stats.pow_difficulty = 1; // XXX TODO
worker_stats.pow_difficulty = stratum_stats.minimum_share_difficulty;
stratum_stats.worker_stats.push(worker_stats);
stratum_stats.num_workers = workers_list.len();
worker_id
@@ -885,6 +885,7 @@ impl StratumServer {
let mut stratum_stats = self.stratum_stats.write();
stratum_stats.is_running = true;
stratum_stats.edge_bits = (global::min_edge_bits() + 1) as u16;
stratum_stats.minimum_share_difficulty = self.config.minimum_share_difficulty;
}
warn!(