mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(primitives): re-export alloy Recovered (#13670)
This commit is contained in:
@ -60,7 +60,7 @@ impl TryFrom<RecoveredTx<OpTransactionSigned>> for OpPooledTransaction {
|
||||
fn try_from(value: RecoveredTx<OpTransactionSigned>) -> Result<Self, Self::Error> {
|
||||
let (tx, signer) = value.into_parts();
|
||||
let pooled: RecoveredTx<op_alloy_consensus::OpPooledTransaction> =
|
||||
RecoveredTx::from_signed_transaction(tx.try_into()?, signer);
|
||||
RecoveredTx::new_unchecked(tx.try_into()?, signer);
|
||||
Ok(pooled.into())
|
||||
}
|
||||
}
|
||||
@ -84,7 +84,7 @@ impl PoolTransaction for OpPooledTransaction {
|
||||
tx: RecoveredTx<Self::Consensus>,
|
||||
) -> Result<RecoveredTx<Self::Pooled>, Self::TryFromConsensusError> {
|
||||
let (tx, signer) = tx.into_parts();
|
||||
Ok(RecoveredTx::from_signed_transaction(tx.try_into()?, signer))
|
||||
Ok(RecoveredTx::new_unchecked(tx.try_into()?, signer))
|
||||
}
|
||||
|
||||
fn hash(&self) -> &TxHash {
|
||||
@ -459,7 +459,7 @@ mod tests {
|
||||
});
|
||||
let signature = Signature::test_signature();
|
||||
let signed_tx = OpTransactionSigned::new_unhashed(deposit_tx, signature);
|
||||
let signed_recovered = RecoveredTx::from_signed_transaction(signed_tx, signer);
|
||||
let signed_recovered = RecoveredTx::new_unchecked(signed_tx, signer);
|
||||
let len = signed_recovered.encode_2718_len();
|
||||
let pooled_tx = OpPooledTransaction::new(signed_recovered, len);
|
||||
let outcome = validator.validate_one(origin, pooled_tx);
|
||||
|
||||
@ -67,7 +67,7 @@ impl OpPayloadTransactions for CustomTxPriority {
|
||||
..Default::default()
|
||||
};
|
||||
let signature = sender.sign_transaction_sync(&mut end_of_block_tx).unwrap();
|
||||
let end_of_block_tx = RecoveredTx::from_signed_transaction(
|
||||
let end_of_block_tx = RecoveredTx::new_unchecked(
|
||||
OpTransactionSigned::new_unhashed(
|
||||
OpTypedTransaction::Eip1559(end_of_block_tx),
|
||||
signature,
|
||||
|
||||
Reference in New Issue
Block a user