Skip to content

Commit 7e5feb3

Browse files
committed
fix: remove arc and clones
1 parent 5c564fb commit 7e5feb3

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

bin/builder.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use builder::{
66
use init4_bin_base::{deps::tracing, utils::from_env::FromEnv};
77
use signet_sim::SimCache;
88
use signet_types::constants::SignetSystemConstants;
9-
use std::sync::Arc;
109
use tokio::select;
1110
use tracing::info_span;
1211

@@ -44,12 +43,12 @@ async fn main() -> eyre::Result<()> {
4443
let sim_items = SimCache::new();
4544
let slot_calculator = config.slot_calculator;
4645

47-
let sim = Arc::new(Simulator::new(&config, ru_provider.clone(), slot_calculator));
46+
let sim = Simulator::new(&config, ru_provider.clone(), slot_calculator);
4847

4948
let (basefee_jh, sim_cache_jh) =
5049
sim.spawn_cache_tasks(tx_receiver, bundle_receiver, sim_items.clone());
5150

52-
let build_jh = sim.clone().spawn_simulator_task(constants, sim_items.clone(), submit_channel);
51+
let build_jh = sim.spawn_simulator_task(constants, sim_items.clone(), submit_channel);
5352

5453
let server = serve_builder(([0, 0, 0, 0], config.builder_port));
5554

src/tasks/block.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ impl Simulator {
208208
///
209209
/// A `JoinHandle` for the spawned task.
210210
pub fn spawn_simulator_task(
211-
self: Arc<Self>,
211+
self,
212212
constants: SignetSystemConstants,
213213
cache: SimCache,
214214
submit_sender: mpsc::UnboundedSender<BuiltBlock>,
215215
) -> JoinHandle<()> {
216-
debug!("starting builder task");
216+
debug!("starting simulator task");
217217

218218
tokio::spawn(async move { self.run_simulator(constants, cache, submit_sender).await })
219219
}
@@ -233,7 +233,7 @@ impl Simulator {
233233
/// - `cache`: The simulation cache containing transactions and bundles.
234234
/// - `submit_sender`: A channel sender used to submit built blocks.
235235
async fn run_simulator(
236-
self: Arc<Self>,
236+
self,
237237
constants: SignetSystemConstants,
238238
cache: SimCache,
239239
submit_sender: mpsc::UnboundedSender<BuiltBlock>,

0 commit comments

Comments
 (0)