chore: Mark into_recovered_unchecked as deprecated (#16283)

This commit is contained in:
Louis Brown
2025-05-16 13:16:45 -03:00
committed by GitHub
parent 34591d30ab
commit 8afbc19083
2 changed files with 6 additions and 2 deletions

View File

@@ -104,6 +104,7 @@ pub trait SignedTransaction:
/// ensuring that the signature has a low `s` value_ (EIP-2).
///
/// Returns `RecoveryError` if the transaction's signature is invalid.
#[deprecated(note = "Use try_into_recovered_unchecked instead")]
#[auto_impl(keep_default_for(&, Arc))]
fn into_recovered_unchecked(self) -> Result<Recovered<Self>, RecoveryError> {
self.recover_signer_unchecked().map(|signer| Recovered::new_unchecked(self, signer))

View File

@@ -6,7 +6,10 @@ use crate::{
helpers::estimate::EstimateCall, FromEthApiError, FullEthApiTypes, IntoEthApiError,
RpcNodeCore, RpcNodeCoreExt, RpcReceipt, RpcTransaction,
};
use alloy_consensus::{transaction::TransactionMeta, BlockHeader, Transaction};
use alloy_consensus::{
transaction::{SignerRecoverable, TransactionMeta},
BlockHeader, Transaction,
};
use alloy_dyn_abi::TypedData;
use alloy_eips::{eip2718::Encodable2718, BlockId};
use alloy_network::TransactionBuilder;
@@ -483,7 +486,7 @@ pub trait LoadTransaction: SpawnBlocking + FullEthApiTypes + RpcNodeCoreExt {
// part of pending block) and already. We don't need to
// check for pre EIP-2 because this transaction could be pre-EIP-2.
let transaction = tx
.into_recovered_unchecked()
.try_into_recovered_unchecked()
.map_err(|_| EthApiError::InvalidTransactionSignature)?;
let tx = TransactionSource::Block {