1
- use std:: { iter:: repeat_with, path:: PathBuf , sync:: Arc , time :: Duration } ;
1
+ use std:: { iter:: repeat_with, path:: PathBuf , sync:: Arc } ;
2
2
3
3
use :: metrics:: prometheus:: PrometheusMetrics ;
4
4
use anyhow:: { Context , Result } ;
@@ -14,37 +14,27 @@ use sailfish::{
14
14
use serde:: { Deserialize , Serialize } ;
15
15
use timeboost:: { committee:: CommitteeInfo , config:: NodeConfig } ;
16
16
use timeboost_utils:: types:: logging;
17
- use tokio:: { select, signal, time :: sleep } ;
17
+ use tokio:: { select, signal} ;
18
18
use tracing:: { error, info} ;
19
19
20
20
use clap:: Parser ;
21
21
22
22
#[ derive( Parser , Debug ) ]
23
23
struct Cli {
24
- /// Path to file containing the keyset description.
25
- ///
26
- /// The file contains backend urls and public key material.
24
+ /// Path to node configuration.
27
25
#[ clap( long, short) ]
28
26
config : PathBuf ,
29
27
30
- /// How many rounds to run.
31
- #[ clap( long, default_value_t = 1000 ) ]
32
- until : u64 ,
33
-
34
- /// Max. number of seconds to run.
35
- #[ clap( long, default_value_t = 30 ) ]
36
- timeout : u64 ,
37
-
38
- /// Backwards compatibility. This allows for a single region to run (i.e. local)
39
- #[ clap( long, default_value_t = false ) ]
40
- multi_region : bool ,
41
-
42
28
/// Path to a file that this process creates or reads as execution proof.
43
29
#[ clap( long) ]
44
30
stamp : PathBuf ,
45
31
46
32
#[ clap( long, default_value_t = false ) ]
47
33
ignore_stamp : bool ,
34
+
35
+ /// How many rounds to run.
36
+ #[ clap( long, default_value_t = 1000 ) ]
37
+ until : u64 ,
48
38
}
49
39
50
40
/// Payload data type is a block of 512 random bytes.
@@ -148,8 +138,6 @@ async fn main() -> Result<()> {
148
138
}
149
139
}
150
140
151
- let mut timeout = Box :: pin ( sleep ( Duration :: from_secs ( cli. timeout ) ) ) ;
152
-
153
141
' main: loop {
154
142
select ! {
155
143
result = coordinator. next( ) => {
@@ -171,10 +159,6 @@ async fn main() -> Result<()> {
171
159
} ,
172
160
}
173
161
}
174
- _ = & mut timeout => {
175
- error!( "timeout" ) ;
176
- break ;
177
- }
178
162
_ = signal:: ctrl_c( ) => {
179
163
info!( "received ctrl-c; shutting down" ) ;
180
164
break ;
0 commit comments