Skip to content

Commit d69f4f3

Browse files
committed
fix: remove arc and clones
1 parent 11e8f94 commit d69f4f3

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/sim.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@ impl Simulator {
202202
///
203203
/// A `JoinHandle` for the spawned task.
204204
pub fn spawn_simulator_task(
205-
self: Arc<Self>,
205+
self,
206206
constants: SignetSystemConstants,
207207
cache: SimCache,
208208
submit_sender: mpsc::UnboundedSender<BuiltBlock>,
209209
) -> JoinHandle<()> {
210-
debug!("starting builder task");
210+
debug!("starting simulator task");
211211

212212
tokio::spawn(async move { self.run_simulator(constants, cache, submit_sender).await })
213213
}
@@ -227,7 +227,7 @@ impl Simulator {
227227
/// - `cache`: The simulation cache containing transactions and bundles.
228228
/// - `submit_sender`: A channel sender used to submit built blocks.
229229
async fn run_simulator(
230-
self: Arc<Self>,
230+
self,
231231
constants: SignetSystemConstants,
232232
cache: SimCache,
233233
submit_sender: mpsc::UnboundedSender<BuiltBlock>,

0 commit comments

Comments
 (0)