diff --git a/crates/consensus/src/transaction/recovered.rs b/crates/consensus/src/transaction/recovered.rs index 571abf9d27b..db1c5479cf7 100644 --- a/crates/consensus/src/transaction/recovered.rs +++ b/crates/consensus/src/transaction/recovered.rs @@ -48,6 +48,11 @@ impl Recovered { (self.tx, self.signer) } + /// Converts from `&Recovered` to `Recovered<&T>`. + pub const fn as_recovered_ref(&self) -> Recovered<&T> { + Recovered { tx: &self.tx, signer: self.signer() } + } + /// Create [`Recovered`] from the given transaction and [`Address`] of the signer. /// /// Note: This does not check if the signer is the actual signer of the transaction.