Skip to content

Commit c697543

Browse files
authored
chore: relax tryfrom impl (#13691)
1 parent 28761db commit c697543

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/primitives/src/alloy_compat.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
33
use crate::{BlockBody, SealedBlock, Transaction, TransactionSigned};
44
use alloc::string::ToString;
5-
use alloy_consensus::TxEnvelope;
5+
use alloy_consensus::{Header, TxEnvelope};
66
use alloy_network::{AnyRpcBlock, AnyRpcTransaction, AnyTxEnvelope};
77
use alloy_serde::WithOtherFields;
88
use op_alloy_rpc_types as _;
99
use reth_primitives_traits::SealedHeader;
1010

11-
impl TryFrom<AnyRpcBlock> for SealedBlock {
11+
impl<T> TryFrom<AnyRpcBlock> for SealedBlock<Header, BlockBody<T>>
12+
where
13+
T: TryFrom<AnyRpcTransaction, Error = alloy_rpc_types::ConversionError>,
14+
{
1215
type Error = alloy_rpc_types::ConversionError;
1316

1417
fn try_from(block: AnyRpcBlock) -> Result<Self, Self::Error> {

0 commit comments

Comments
 (0)