From c9e605fda220d20fcc09c229ea416bed556ec315 Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Wed, 18 Dec 2024 16:13:23 +0100 Subject: [PATCH] WIP for test with `RUSK_MINIMUM_BLOCK_TIME=1 DUSK_CONSENSUS_KEYS_PASS=password cargo r --release -p rusk -- -s /tmp/localnet.state` --- consensus/src/consensus.rs | 2 ++ rusk/src/lib/node/rusk.rs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/consensus/src/consensus.rs b/consensus/src/consensus.rs index e5cab081e..2343bd1a6 100644 --- a/consensus/src/consensus.rs +++ b/consensus/src/consensus.rs @@ -6,6 +6,7 @@ use std::cmp; use std::sync::Arc; +use std::time::Duration; use node_data::message::{AsyncQueue, Message, Payload}; use tokio::sync::{oneshot, Mutex}; @@ -106,6 +107,7 @@ impl Consensus { } }; + tokio::time::sleep(Duration::from_secs(1)).await; // Tear-down procedure abort(&mut handle).await; diff --git a/rusk/src/lib/node/rusk.rs b/rusk/src/lib/node/rusk.rs index db60032f0..d9cef1d1f 100644 --- a/rusk/src/lib/node/rusk.rs +++ b/rusk/src/lib/node/rusk.rs @@ -7,7 +7,7 @@ use std::path::Path; use std::sync::{mpsc, Arc, LazyLock}; use std::time::{Duration, Instant}; -use std::{fs, io}; +use std::{fs, io, thread}; use execution_core::stake::StakeKeys; use execution_core::transfer::PANIC_NONCE_NOT_READY; @@ -271,6 +271,7 @@ impl Rusk { slashing: Vec, voters: &[Voter], ) -> Result<(Vec, VerificationOutput)> { + thread::sleep(Duration::from_secs(1)); let session = self.new_block_session(block_height, prev_commit)?; accept(