Skip to content

Commit

Permalink
feat: reduce relayer next_initiative waiting time
Browse files Browse the repository at this point in the history
  • Loading branch information
hugocaillard committed Jan 23, 2024
1 parent 2d17422 commit 86032f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testnet/stacks-node/src/nakamoto_node/relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -786,10 +786,10 @@ impl RelayerThread {
pub fn main(mut self, relay_rcv: Receiver<RelayerDirective>) {
debug!("relayer thread ID is {:?}", std::thread::current().id());

self.next_initiative = Instant::now() + Duration::from_secs(10);
self.next_initiative = Instant::now() + Duration::from_secs(1);
while self.globals.keep_running() {
let directive = if Instant::now() >= self.next_initiative {
self.next_initiative = Instant::now() + Duration::from_secs(10);
self.next_initiative = Instant::now() + Duration::from_secs(1);
self.initiative()
} else {
None
Expand Down

0 comments on commit 86032f6

Please sign in to comment.