diff --git a/crates/network-primitives/src/block.rs b/crates/network-primitives/src/block.rs index c403b21050e..c271df10ef4 100644 --- a/crates/network-primitives/src/block.rs +++ b/crates/network-primitives/src/block.rs @@ -131,8 +131,8 @@ impl BlockTransactions { impl BlockTransactions { /// Creates a new [`BlockTransactions::Hashes`] variant from the given iterator of transactions. - pub fn new_hashes(txs: impl IntoIterator) -> Self { - Self::Hashes(txs.into_iter().map(|tx| tx.tx_hash()).collect()) + pub fn new_hashes(txs: impl IntoIterator>) -> Self { + Self::Hashes(txs.into_iter().map(|tx| tx.as_ref().tx_hash()).collect()) } /// Converts `self` into `Hashes`.