Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
pompon0 committed Dec 16, 2024
1 parent b15b174 commit 5e32ac7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions node/components/bft/src/chonky_bft/tests/new_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,12 @@ async fn replica_new_view_old() {
zksync_concurrency::testonly::abort_on_panic();
let ctx = &ctx::test_root(&ctx::RealClock);
scope::run!(ctx, |ctx, s| async {
let (mut util, runner) = UTHarness::new(ctx, 1).await;
let (mut util, runner) = UTHarness::new(ctx, 2).await;
s.spawn_bg(runner.run(ctx));

let replica_new_view = util.new_replica_new_view(ctx).await;
let replica_new_view = util.owner_key().sign_msg(replica_new_view);
// Sign the messages with non-leader key.
let replica_new_view = util.keys[1].sign_msg(replica_new_view);

// Process new_view twice. The second time it shouldn't be accepted.
util.process_replica_new_view(ctx, replica_new_view.clone())
Expand Down
3 changes: 1 addition & 2 deletions node/components/bft/src/testonly/node.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use crate::{testonly, FromNetworkMessage, PayloadManager, ToNetworkMessage};
use anyhow::Context as _;
use std::sync::Arc;
use zksync_concurrency::time;
use zksync_concurrency::{ctx, ctx::channel, scope, sync};
use zksync_concurrency::{ctx, ctx::channel, scope, sync, time};
use zksync_consensus_network as network;
use zksync_consensus_storage as storage;
use zksync_consensus_storage::testonly::in_memory;
Expand Down

0 comments on commit 5e32ac7

Please sign in to comment.