18
18
19
19
use darkfi:: {
20
20
event_graph:: {
21
- util:: { generate_genesis, next_rotation_timestamp , seconds_until_next_rotation } ,
21
+ util:: { generate_genesis, millis_until_next_rotation , next_rotation_timestamp } ,
22
22
Event , GENESIS_CONTENTS , INITIAL_GENESIS , NULL_ID , N_EVENT_PARENTS ,
23
23
} ,
24
- system:: { sleep , Publisher , PublisherPtr , StoppableTask , StoppableTaskPtr } ,
24
+ system:: { msleep , Publisher , PublisherPtr , StoppableTask , StoppableTaskPtr } ,
25
25
Error , Result ,
26
26
} ;
27
27
use darkfi_serial:: {
@@ -173,7 +173,7 @@ impl LocalEventGraph {
173
173
174
174
loop {
175
175
// Find the next rotation timestamp:
176
- let next_rotation = next_rotation_timestamp ( INITIAL_GENESIS / 1000 , days_rotation) ;
176
+ let next_rotation = next_rotation_timestamp ( INITIAL_GENESIS , days_rotation) ;
177
177
178
178
// Prepare the new genesis event
179
179
let current_genesis = Event {
@@ -184,10 +184,10 @@ impl LocalEventGraph {
184
184
} ;
185
185
186
186
// Sleep until it's time to rotate.
187
- let s = seconds_until_next_rotation ( next_rotation) ;
187
+ let s = millis_until_next_rotation ( next_rotation) ;
188
188
189
189
debug ! ( target: "event_graph::dag_prune_task()" , "Sleeping {}s until next DAG prune" , s) ;
190
- sleep ( s) . await ;
190
+ msleep ( s) . await ;
191
191
debug ! ( target: "event_graph::dag_prune_task()" , "Rotation period reached" ) ;
192
192
193
193
// Trigger DAG prune
0 commit comments