Skip to content

Commit

Permalink
fix: trim last / from urls
Browse files Browse the repository at this point in the history
  • Loading branch information
merklefruit committed Sep 18, 2024
1 parent 1e98385 commit 970aacd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions crates/kona-providers/src/blob_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ impl LayeredBlobProvider {
let memory = Arc::new(Mutex::new(InnerBlobProvider::with_capacity(512)));

let online = OnlineBlobProviderBuilder::new()
.with_primary(beacon_client_url.to_string())
.with_fallback(blob_archiver_url.map(|url| url.to_string()))
.with_primary(beacon_client_url.as_str().trim_end_matches('/').to_string())
.with_fallback(
blob_archiver_url.map(|url| url.as_str().trim_end_matches('/').to_string()),
)
.build();

Self { memory, online }
Expand Down
10 changes: 7 additions & 3 deletions crates/rollup/src/driver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ impl Driver<StandaloneHeraContext, AlloyChainProvider, DurableBlobProvider> {
pub async fn standalone(args: HeraArgsExt, cfg: Arc<RollupConfig>) -> Result<Self> {
let chain_provider = AlloyChainProvider::new_http(args.l1_rpc_url.clone());
let blob_provider = OnlineBlobProviderBuilder::new()
.with_primary(args.l1_beacon_client_url.to_string())
.with_fallback(args.l1_blob_archiver_url.clone().map(|url| url.to_string()))
.with_primary(args.l1_beacon_client_url.as_str().trim_end_matches('/').to_string())
.with_fallback(
args.l1_blob_archiver_url
.clone()
.map(|url| url.as_str().trim_end_matches('/').to_string()),
)
.build();

// The Standalone Hera context is responsible for handling notifications from the node.
Expand Down Expand Up @@ -166,7 +170,7 @@ where
let l2_tip = self.cursor.tip();

match pipeline.step(l2_tip).await {
StepResult::PreparedAttributes => trace!("Perpared new attributes"),
StepResult::PreparedAttributes => trace!("Prepared new attributes"),
StepResult::AdvancedOrigin => trace!("Advanced origin"),
StepResult::OriginAdvanceErr(err) => warn!("Could not advance origin: {:?}", err),
StepResult::StepFailed(err) => match err {
Expand Down

0 comments on commit 970aacd

Please sign in to comment.