Skip to content

Commit 682b2b2

Browse files
authored
chore: remove duplicated compact consts (#13679)
1 parent 4d19169 commit 682b2b2

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

crates/primitives/src/transaction/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ pub(crate) mod access_list;
5252
mod pooled;
5353
mod tx_type;
5454

55-
#[cfg(any(test, feature = "reth-codec"))]
56-
pub use tx_type::{
57-
COMPACT_EXTENDED_IDENTIFIER_FLAG, COMPACT_IDENTIFIER_EIP1559, COMPACT_IDENTIFIER_EIP2930,
58-
COMPACT_IDENTIFIER_LEGACY,
59-
};
60-
6155
/// Expected number of transactions where we can expect a speed-up by recovering the senders in
6256
/// parallel.
6357
pub static PARALLEL_SENDER_RECOVERY_THRESHOLD: LazyLock<usize> =

crates/primitives/src/transaction/tx_type.rs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,6 @@ use derive_more::Display;
1111
use reth_primitives_traits::InMemorySize;
1212
use serde::{Deserialize, Serialize};
1313

14-
/// Identifier parameter for legacy transaction
15-
#[cfg(any(test, feature = "reth-codec"))]
16-
pub const COMPACT_IDENTIFIER_LEGACY: usize = 0;
17-
18-
/// Identifier parameter for EIP-2930 transaction
19-
#[cfg(any(test, feature = "reth-codec"))]
20-
pub const COMPACT_IDENTIFIER_EIP2930: usize = 1;
21-
22-
/// Identifier parameter for EIP-1559 transaction
23-
#[cfg(any(test, feature = "reth-codec"))]
24-
pub const COMPACT_IDENTIFIER_EIP1559: usize = 2;
25-
26-
/// For backwards compatibility purposes only 2 bits of the type are encoded in the identifier
27-
/// parameter. In the case of a [`COMPACT_EXTENDED_IDENTIFIER_FLAG`], the full transaction type is
28-
/// read from the buffer as a single byte.
29-
#[cfg(any(test, feature = "reth-codec"))]
30-
pub const COMPACT_EXTENDED_IDENTIFIER_FLAG: usize = 3;
31-
3214
/// Transaction Type
3315
///
3416
/// Currently being used as 2-bit type when encoding it to `reth_codecs::Compact` on
@@ -256,7 +238,7 @@ impl Decodable for TxType {
256238
mod tests {
257239
use super::*;
258240
use alloy_primitives::hex;
259-
use reth_codecs::Compact;
241+
use reth_codecs::{txtype::*, Compact};
260242
use rstest::rstest;
261243

262244
#[rstest]

0 commit comments

Comments
 (0)