Skip to content

Commit

Permalink
feat: add requests with capacity (#1794)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Dec 13, 2024
1 parent 34b3f8c commit 8219286
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/eips/src/eip7685.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ pub const EMPTY_REQUESTS_HASH: B256 =
pub struct Requests(Vec<Bytes>);

impl Requests {
/// Construct a new [`Requests`] container with the given capacity.
pub fn with_capacity(capacity: usize) -> Self {
Self(Vec::with_capacity(capacity))
}

/// Construct a new [`Requests`] container.
///
/// This function assumes that the request type byte is already included as the
Expand Down

0 comments on commit 8219286

Please sign in to comment.