Skip to content

Commit

Permalink
grin v5.3 (0060) fix for missing increment of stratum stats blocks_fo…
Browse files Browse the repository at this point in the history
  • Loading branch information
bayk committed Jun 16, 2024
1 parent 3ce3b06 commit b6c9b8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions servers/src/mining/stratum_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,10 @@ impl WorkersList {
.edge_bits
.store(edge_bits, Ordering::Relaxed);
}

pub fn increment_block_found(&self) {
self.stratum_stats
.blocks_found
.fetch_add(1, Ordering::Relaxed);
}
}
1 change: 1 addition & 0 deletions servers/src/mining/stratumserver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ impl Handler {
share_is_block = true;
self.workers
.update_stats(worker_id, |worker_stats| worker_stats.num_blocks_found += 1);
self.workers.increment_block_found();
// Log message to make it obvious we found a block
let stats = self
.workers
Expand Down

0 comments on commit b6c9b8c

Please sign in to comment.