Skip to content

Commit

Permalink
bug: alloy-consensus should use alloy_primitives::Sealable (#1072)
Browse files Browse the repository at this point in the history
* use Sealable and Sealed from alloy-primitives

* fix path in docs
  • Loading branch information
zerosnacks authored Jul 18, 2024
1 parent 423a4c5 commit 067cc46
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 73 deletions.
7 changes: 4 additions & 3 deletions crates/consensus/src/header.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use crate::Sealable;
use alloy_eips::{
eip1559::{calc_next_block_base_fee, BaseFeeParams},
eip4844::{calc_blob_gasprice, calc_excess_blob_gas},
};
use alloy_primitives::{b256, keccak256, Address, BlockNumber, Bloom, Bytes, B256, B64, U256};
use alloy_primitives::{
b256, keccak256, Address, BlockNumber, Bloom, Bytes, Sealable, B256, B64, U256,
};
use alloy_rlp::{
length_of_length, Buf, BufMut, Decodable, Encodable, EMPTY_LIST_CODE, EMPTY_STRING_CODE,
};
Expand Down Expand Up @@ -161,7 +162,7 @@ impl Default for Header {
}

impl Sealable for Header {
fn hash(&self) -> B256 {
fn hash_slow(&self) -> B256 {
self.hash_slow()
}
}
Expand Down
3 changes: 1 addition & 2 deletions crates/consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ pub use alloy_eips::eip4844::{
#[cfg(feature = "kzg")]
pub use alloy_eips::eip4844::env_settings::EnvKzgSettings;

mod sealed;
pub use sealed::{Sealable, Sealed};
pub use alloy_primitives::{Sealable, Sealed};

mod signed;
pub use signed::Signed;
2 changes: 1 addition & 1 deletion crates/consensus/src/receipt/receipts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl<T> From<ReceiptWithBloom<T>> for Receipt<T> {
/// This convenience type allows us to lazily calculate the bloom filter for a
/// receipt, similar to [`Sealed`].
///
/// [`Sealed`]: crate::sealed::Sealed
/// [`Sealed`]: crate::Sealed
#[derive(Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
Expand Down
67 changes: 0 additions & 67 deletions crates/consensus/src/sealed.rs

This file was deleted.

0 comments on commit 067cc46

Please sign in to comment.