Skip to content

Commit 067cc46

Browse files
authored
bug: alloy-consensus should use alloy_primitives::Sealable (#1072)
* use Sealable and Sealed from alloy-primitives * fix path in docs
1 parent 423a4c5 commit 067cc46

File tree

4 files changed

+6
-73
lines changed

4 files changed

+6
-73
lines changed

crates/consensus/src/header.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
use crate::Sealable;
21
use alloy_eips::{
32
eip1559::{calc_next_block_base_fee, BaseFeeParams},
43
eip4844::{calc_blob_gasprice, calc_excess_blob_gas},
54
};
6-
use alloy_primitives::{b256, keccak256, Address, BlockNumber, Bloom, Bytes, B256, B64, U256};
5+
use alloy_primitives::{
6+
b256, keccak256, Address, BlockNumber, Bloom, Bytes, Sealable, B256, B64, U256,
7+
};
78
use alloy_rlp::{
89
length_of_length, Buf, BufMut, Decodable, Encodable, EMPTY_LIST_CODE, EMPTY_STRING_CODE,
910
};
@@ -161,7 +162,7 @@ impl Default for Header {
161162
}
162163

163164
impl Sealable for Header {
164-
fn hash(&self) -> B256 {
165+
fn hash_slow(&self) -> B256 {
165166
self.hash_slow()
166167
}
167168
}

crates/consensus/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ pub use alloy_eips::eip4844::{
4242
#[cfg(feature = "kzg")]
4343
pub use alloy_eips::eip4844::env_settings::EnvKzgSettings;
4444

45-
mod sealed;
46-
pub use sealed::{Sealable, Sealed};
45+
pub use alloy_primitives::{Sealable, Sealed};
4746

4847
mod signed;
4948
pub use signed::Signed;

crates/consensus/src/receipt/receipts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<T> From<ReceiptWithBloom<T>> for Receipt<T> {
107107
/// This convenience type allows us to lazily calculate the bloom filter for a
108108
/// receipt, similar to [`Sealed`].
109109
///
110-
/// [`Sealed`]: crate::sealed::Sealed
110+
/// [`Sealed`]: crate::Sealed
111111
#[derive(Clone, Debug, Default, PartialEq, Eq)]
112112
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
113113
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]

crates/consensus/src/sealed.rs

-67
This file was deleted.

0 commit comments

Comments
 (0)