Skip to content

Replace tuple with BlockNumHash #239

@emhane

Description

@emhane

Describe the feature

Make this a wrapper of alloy_eips::BlockNumHash instead

/// Wrapper for block number and block hash tuple to implement [`Compress`]/[`Decompress`].
///
/// Used for storing block metadata (number + hash).
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, From, Into, Constructor)]
pub struct BlockNumberHash(pub u64, pub B256);

Additional context

alloy-eips is already a dependency of reth-optimism-trie indirectly via reth-trie which depends on alloy-consensus, alloy-consensus depends on alloy-eips, so we might as well use the nice existing type from alloy-eips

Metadata

Metadata

Assignees

Labels

A-trieArea: Merkle Patricia TrieK-debtKind: debtM-good-first-issueMeta: good issue for first time contributorsW-historical-proofsWorkstream: historical-proofs

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions