Skip to content

Commit ad4eff9

Browse files
committed
fix: access flashbots field properly in builder config
1 parent ffc1ea7 commit ad4eff9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/config.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,8 @@ impl BuilderConfig {
249249
&self,
250250
config: &BuilderConfig,
251251
) -> Result<FlashbotsProvider, eyre::Error> {
252-
let endpoint = config
253-
.flashbots
254-
.flashbots_endpoint
255-
.clone()
256-
.expect("flashbots endpoint must be configured");
252+
let endpoint =
253+
config.flashbots_endpoint.clone().expect("flashbots endpoint must be configured");
257254
let signer = config.connect_builder_signer().await?;
258255
let flashbots: FlashbotsProvider =
259256
ProviderBuilder::new().wallet(signer).connect_http(endpoint);
@@ -332,7 +329,7 @@ impl BuilderConfig {
332329
&self,
333330
tx_channel: UnboundedSender<TxHash>,
334331
) -> eyre::Result<(UnboundedSender<SimResult>, JoinHandle<()>)> {
335-
match &self.flashbots.flashbots_endpoint {
332+
match &self.flashbots_endpoint {
336333
Some(url) => {
337334
info!(url = url.as_str(), "spawning flashbots submit task");
338335
let submit = FlashbotsTask::new(self.clone(), tx_channel).await?;

0 commit comments

Comments
 (0)