File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
1
use std:: { sync:: Arc , sync:: RwLock , time:: Instant } ;
2
2
3
3
use colored:: * ;
4
- use drillx:: {
5
- equix:: { self } ,
6
- Hash , Solution ,
7
- } ;
4
+ use drillx:: { difficulty, equix:: { self } , Hash , Solution } ;
8
5
use ore_api:: {
9
6
consts:: { BUS_ADDRESSES , BUS_COUNT , EPOCH_DURATION } ,
10
7
state:: { Config , Proof } ,
@@ -116,13 +113,22 @@ impl Miner {
116
113
if nonce % 100 == 0 {
117
114
let global_best_difficulty = * global_best_difficulty. read ( ) . unwrap ( ) ;
118
115
if timer. elapsed ( ) . as_secs ( ) . ge ( & cutoff_time) {
116
+ if i == 0 {
117
+ progress_bar. set_message ( format ! (
118
+ "Mining... ({} / {} difficulty)" ,
119
+ global_best_difficulty,
120
+ min_difficulty,
121
+ ) ) ;
122
+ }
119
123
if global_best_difficulty. ge ( & min_difficulty) {
120
124
// Mine until min difficulty has been met
121
125
break ;
122
126
}
123
127
} else if i == 0 {
124
128
progress_bar. set_message ( format ! (
125
- "Mining... ({} sec remaining)" ,
129
+ "Mining... ({} / {} difficulty, {} sec remaining)" ,
130
+ global_best_difficulty,
131
+ min_difficulty,
126
132
cutoff_time. saturating_sub( timer. elapsed( ) . as_secs( ) ) ,
127
133
) ) ;
128
134
}
You can’t perform that action at this time.
0 commit comments