Skip to content

Commit

Permalink
Nitpick From impls and add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchTurner committed Dec 18, 2024
1 parent fc107cc commit 38eebde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ impl TableWithBlueprint for UnrecordedBlocksTable {
}
}

/// Used to store the latest L2 block that has been recorded on the DA chain
pub struct RecordedHeights;

impl Mappable for RecordedHeights {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ impl From<&RawDaBlockCosts> for DaBlockCosts {
}
}

impl From<RawDaBlockCosts> for DaBlockCosts {
fn from(value: RawDaBlockCosts) -> Self {
Self::from(&value)
}
}

impl<BlockCommitter> BlockCommitterDaBlockCosts<BlockCommitter> {
/// Create a new instance of the block committer da block costs source
pub fn new(
Expand Down Expand Up @@ -117,17 +123,6 @@ where
}
}

impl From<RawDaBlockCosts> for DaBlockCosts {
fn from(value: RawDaBlockCosts) -> Self {
Self {
bundle_id: value.id,
l2_blocks: value.start_height..=value.end_height,
bundle_size_bytes: value.size,
blob_cost_wei: value.cost,
}
}
}

pub struct BlockCommitterHttpApi {
client: reqwest::Client,
url: Option<String>,
Expand Down

0 comments on commit 38eebde

Please sign in to comment.