Skip to content

Commit 1159cbc

Browse files
authored
chore(config): make flashbots URL not optional. (#180)
No reason to have this optional, probably vestigial from when we had multiple submit tasks.
1 parent ce71e42 commit 1159cbc

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/config.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub struct BuilderConfig {
9191
var = "FLASHBOTS_ENDPOINT",
9292
desc = "Flashbots endpoint for privately submitting Signet bundles"
9393
)]
94-
pub flashbots_endpoint: Option<url::Url>,
94+
pub flashbots_endpoint: url::Url,
9595

9696
/// URL for remote Quincey Sequencer server to sign blocks.
9797
/// NB: Disregarded if a sequencer_signer is configured.
@@ -219,11 +219,9 @@ impl BuilderConfig {
219219
&self,
220220
config: &BuilderConfig,
221221
) -> Result<FlashbotsProvider, eyre::Error> {
222-
let endpoint =
223-
config.flashbots_endpoint.clone().expect("flashbots endpoint must be configured");
224222
let signer = config.connect_builder_signer().await?;
225223
let flashbots: FlashbotsProvider =
226-
ProviderBuilder::new().wallet(signer).connect_http(endpoint);
224+
ProviderBuilder::new().wallet(signer).connect_http(config.flashbots_endpoint.clone());
227225
Ok(flashbots)
228226
}
229227

src/test_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn setup_test_config() -> Result<BuilderConfig> {
3232
.unwrap()
3333
.try_into()
3434
.unwrap(),
35-
flashbots_endpoint: Some("https://relay-sepolia.flashbots.net:443".parse().unwrap()),
35+
flashbots_endpoint: "https://relay-sepolia.flashbots.net:443".parse().unwrap(),
3636
quincey_url: "http://localhost:8080".into(),
3737
sequencer_key: None,
3838
builder_key: env::var("SEPOLIA_ETH_PRIV_KEY")

0 commit comments

Comments
 (0)