File tree Expand file tree Collapse file tree 6 files changed +379
-325
lines changed Expand file tree Collapse file tree 6 files changed +379
-325
lines changed Original file line number Diff line number Diff line change @@ -269,10 +269,10 @@ pub struct MonitorSignersArgs {
269
269
/// Whether the node is mainnet. Default is false.
270
270
#[ arg( long, default_value = "false" ) ]
271
271
pub mainnet : bool ,
272
- /// Set the polling interval in seconds. Default is 60 seconds.
272
+ /// Set the polling interval in seconds.
273
273
#[ arg( long, short, default_value = "60" ) ]
274
274
pub interval : u64 ,
275
- /// Max age in seconds before a signer message is considered stale. Default is 1200 seconds.
275
+ /// Max age in seconds before a signer message is considered stale.
276
276
#[ arg( long, short, default_value = "1200" ) ]
277
277
pub max_age : u64 ,
278
278
}
Original file line number Diff line number Diff line change @@ -228,16 +228,18 @@ impl StacksClient {
228
228
// Get the signer writers from the stacker-db to find the signer slot id
229
229
let stackerdb_signer_slots =
230
230
self . get_stackerdb_signer_slots ( & signer_stackerdb_contract_id, signer_set) ?;
231
- let mut signer_slot_ids = HashMap :: with_capacity ( stackerdb_signer_slots. len ( ) ) ;
232
- for ( index, ( address, _) ) in stackerdb_signer_slots. into_iter ( ) . enumerate ( ) {
233
- signer_slot_ids. insert (
234
- address,
235
- SignerSlotID (
236
- u32:: try_from ( index) . expect ( "FATAL: number of signers exceeds u32::MAX" ) ,
237
- ) ,
238
- ) ;
239
- }
240
- Ok ( signer_slot_ids)
231
+ Ok ( stackerdb_signer_slots
232
+ . into_iter ( )
233
+ . enumerate ( )
234
+ . map ( |( index, ( address, _) ) | {
235
+ (
236
+ address,
237
+ SignerSlotID (
238
+ u32:: try_from ( index) . expect ( "FATAL: number of signers exceeds u32::MAX" ) ,
239
+ ) ,
240
+ )
241
+ } )
242
+ . collect ( ) )
241
243
}
242
244
243
245
/// Get the vote for a given round, reward cycle, and signer address
Original file line number Diff line number Diff line change @@ -29,12 +29,16 @@ pub mod cli;
29
29
pub mod client;
30
30
/// The configuration module for the signer
31
31
pub mod config;
32
+ /// The signer monitor for observing signer behaviours in the network
33
+ pub mod monitor_signers;
32
34
/// The monitoring server for the signer
33
35
pub mod monitoring;
34
36
/// The primary runloop for the signer
35
37
pub mod runloop;
36
38
/// The signer state module
37
39
pub mod signerdb;
40
+ /// The util module for the signer
41
+ pub mod utils;
38
42
/// The v0 implementation of the signer. This does not include WSTS support
39
43
pub mod v0;
40
44
/// The v1 implementation of the singer. This includes WSTS support
You can’t perform that action at this time.
0 commit comments