Skip to content

Commit

Permalink
WIP for test with `RUSK_MINIMUM_BLOCK_TIME=1 DUSK_CONSENSUS_KEYS_PASS…
Browse files Browse the repository at this point in the history
…=password cargo r --release -p rusk -- -s /tmp/localnet.state`
  • Loading branch information
herr-seppia committed Dec 18, 2024
1 parent 0e237e7 commit c9e605f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions consensus/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -106,6 +107,7 @@ impl<T: Operations + 'static, D: Database + 'static> Consensus<T, D> {
}
};

tokio::time::sleep(Duration::from_secs(1)).await;
// Tear-down procedure
abort(&mut handle).await;

Expand Down
3 changes: 2 additions & 1 deletion rusk/src/lib/node/rusk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -271,6 +271,7 @@ impl Rusk {
slashing: Vec<Slash>,
voters: &[Voter],
) -> Result<(Vec<SpentTransaction>, VerificationOutput)> {
thread::sleep(Duration::from_secs(1));
let session = self.new_block_session(block_height, prev_commit)?;

accept(
Expand Down

0 comments on commit c9e605f

Please sign in to comment.