Skip to content

Commit

Permalink
quick fix for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ma2bd committed Sep 5, 2024
1 parent 77ceed7 commit edd931e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions linera-core/src/unit_tests/worker_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const TEST_GRACE_PERIOD_MICROS: u64 = 500_000;

/// Instantiates the protocol with a single validator. Returns the corresponding committee
/// and the (non-sharded, in-memory) "worker" that we can interact with.
fn init_worker<S>(storage: S, is_client: bool) -> (Committee, WorkerState<S>)
fn init_worker<S>(storage: S, is_client: bool, has_long_lived_services: bool) -> (Committee, WorkerState<S>)
where
S: Storage + Clone + Send + Sync + 'static,
{
Expand All @@ -88,6 +88,7 @@ where
)
.with_allow_inactive_chains(is_client)
.with_allow_messages_from_deprecated_epochs(is_client)
.with_long_lived_services(has_long_lived_services)
.with_grace_period(Duration::from_micros(TEST_GRACE_PERIOD_MICROS));
(committee, worker)
}
Expand All @@ -98,7 +99,7 @@ where
I: IntoIterator<Item = (ChainDescription, PublicKey, Amount)>,
S: Storage + Clone + Send + Sync + 'static,
{
let (committee, worker) = init_worker(storage, /* is_client */ false);
let (committee, worker) = init_worker(storage, /* is_client */ false, /* has_long_lived_services */ true);
for (description, pubk, balance) in balances {
worker
.storage
Expand Down

0 comments on commit edd931e

Please sign in to comment.