Skip to content

Commit

Permalink
feat: add MaybeCancunPayloadFields::as_ref (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimenez authored May 6, 2024
1 parent 20b8152 commit d3f53c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/rpc-types-engine/src/cancun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ impl MaybeCancunPayloadFields {
pub fn versioned_hashes(&self) -> Option<&Vec<B256>> {
self.fields.as_ref().map(|fields| &fields.versioned_hashes)
}

/// Returns a reference to the inner fields.
pub const fn as_ref(&self) -> Option<&CancunPayloadFields> {
self.fields.as_ref()
}
}

impl From<CancunPayloadFields> for MaybeCancunPayloadFields {
Expand Down

0 comments on commit d3f53c0

Please sign in to comment.