diff --git a/node/components/bft/src/chonky_bft/tests/new_view.rs b/node/components/bft/src/chonky_bft/tests/new_view.rs index 5cc134da..ad1086dd 100644 --- a/node/components/bft/src/chonky_bft/tests/new_view.rs +++ b/node/components/bft/src/chonky_bft/tests/new_view.rs @@ -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()) diff --git a/node/components/bft/src/testonly/node.rs b/node/components/bft/src/testonly/node.rs index 25030ed4..f4b9459d 100644 --- a/node/components/bft/src/testonly/node.rs +++ b/node/components/bft/src/testonly/node.rs @@ -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;