Skip to content

Commit

Permalink
rename ns_payload_unchecked -> ns_payload
Browse files Browse the repository at this point in the history
  • Loading branch information
ggutoski committed May 25, 2024
1 parent d95c721 commit 46bbe9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sequencer/src/block/full_payload/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl Payload {
return None;
}
let ns_id = self.ns_table.read_ns_id(index.ns());
let ns_payload = self.ns_payload_unchecked(index.ns());
let ns_payload = self.ns_payload(index.ns());
ns_payload.export_tx(&ns_id, index.tx())
}

Expand All @@ -50,7 +50,7 @@ impl Payload {
/// Convenience wrapper for [`Self::read_ns_payload`].
///
/// `index` is not checked. Use `self.ns_table().in_bounds()` as needed.
pub(in crate::block) fn ns_payload_unchecked(&self, index: &NsIndex) -> &NsPayload {
pub(in crate::block) fn ns_payload(&self, index: &NsIndex) -> &NsPayload {
let ns_payload_range = self.ns_table().ns_range(index, &self.byte_len());
self.read_ns_payload(&ns_payload_range)
}
Expand Down
2 changes: 1 addition & 1 deletion sequencer/src/block/namespace_payload/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl<'a> Iterator for Iter<'a> {

if let Some(tx_index) = self
.tx_iter
.get_or_insert_with(|| self.block.ns_payload_unchecked(ns_index).iter())
.get_or_insert_with(|| self.block.ns_payload(ns_index).iter())
.next()
{
return Some(Index {
Expand Down

0 comments on commit 46bbe9a

Please sign in to comment.