From 46bbe9a7d09745b8a932c1582f422f336d97742c Mon Sep 17 00:00:00 2001 From: Gus Gutoski Date: Sat, 25 May 2024 17:07:45 -0400 Subject: [PATCH] rename ns_payload_unchecked -> ns_payload --- sequencer/src/block/full_payload/payload.rs | 4 ++-- sequencer/src/block/namespace_payload/iter.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sequencer/src/block/full_payload/payload.rs b/sequencer/src/block/full_payload/payload.rs index 11989af453..78d4a0b558 100644 --- a/sequencer/src/block/full_payload/payload.rs +++ b/sequencer/src/block/full_payload/payload.rs @@ -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()) } @@ -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) } diff --git a/sequencer/src/block/namespace_payload/iter.rs b/sequencer/src/block/namespace_payload/iter.rs index 37171ed06b..b5eb40a08d 100644 --- a/sequencer/src/block/namespace_payload/iter.rs +++ b/sequencer/src/block/namespace_payload/iter.rs @@ -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 {