mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-28 00:28:20 -05:00
feat: Introduce with_signer_ref helper (#16235)
This commit is contained in:
@@ -116,6 +116,14 @@ pub trait SignedTransaction:
|
||||
fn with_signer(self, signer: Address) -> Recovered<Self> {
|
||||
Recovered::new_unchecked(self, signer)
|
||||
}
|
||||
|
||||
/// Returns the [`Recovered`] transaction with the given signer, using a reference to self.
|
||||
///
|
||||
/// Note: assumes the given signer is the signer of this transaction.
|
||||
#[auto_impl(keep_default_for(&, Arc))]
|
||||
fn with_signer_ref(&self, signer: Address) -> Recovered<&Self> {
|
||||
Recovered::new_unchecked(self, signer)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> SignedTransaction for EthereumTxEnvelope<T>
|
||||
|
||||
Reference in New Issue
Block a user