Skip to content

Commit bfec573

Browse files
committed
fix: do't double instantiate
1 parent 93d9a6c commit bfec573

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

bin/builder.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,19 @@ async fn main() -> eyre::Result<()> {
1919
// Pull the configuration from the environment
2020
let config = BuilderConfig::from_env()?.clone();
2121

22-
// We connect the WS greedily, so we can fail early if the connection is
23-
// invalid.
24-
let ru_provider = config.connect_ru_provider().await?;
22+
// We connect the providers greedily, so we can fail early if the
23+
// RU WS connection is invalid.
24+
let (ru_provider, host_provider) =
25+
tokio::try_join!(config.connect_ru_provider(), config.connect_host_provider(),)?;
2526

2627
// Spawn the EnvTask
27-
let env_task =
28-
EnvTask::new(config.clone(), config.connect_host_provider().await?, ru_provider.clone());
28+
let env_task = EnvTask::new(config.clone(), host_provider.clone(), ru_provider.clone());
2929
let (block_env, env_jh) = env_task.spawn();
3030

3131
// Spawn the cache system
3232
let cache_tasks = CacheTasks::new(config.clone(), block_env.clone());
3333
let cache_system = cache_tasks.spawn();
3434

35-
// Prep providers and contracts
36-
let host_provider = config.connect_host_provider().await?;
37-
3835
// Set up the metrics task
3936
let metrics = MetricsTask { host_provider };
4037
let (tx_channel, metrics_jh) = metrics.spawn();

src/tasks/submit/flashbots.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl FlashbotsTask {
125125
.instrument(span.clone())
126126
.await
127127
.inspect(|bundle_hash| {
128-
span_debug!(
128+
span_info!(
129129
span,
130130
bundle_hash = %bundle_hash.bundle_hash, "bundle sent to Flashbots"
131131
);

0 commit comments

Comments
 (0)