mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: move bitflags to workspace (#4220)
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -6165,7 +6165,7 @@ dependencies = [
|
|||||||
"assert_matches",
|
"assert_matches",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"auto_impl",
|
"auto_impl",
|
||||||
"bitflags 1.3.2",
|
"bitflags 2.4.0",
|
||||||
"criterion",
|
"criterion",
|
||||||
"fnv",
|
"fnv",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
|||||||
@ -113,6 +113,7 @@ ethers-middleware = { version = "2.0.8", default-features = false }
|
|||||||
|
|
||||||
## misc
|
## misc
|
||||||
bytes = "1.4"
|
bytes = "1.4"
|
||||||
|
bitflags = "2.3"
|
||||||
tracing = "0.1.0"
|
tracing = "0.1.0"
|
||||||
tracing-appender = "0.2"
|
tracing-appender = "0.2"
|
||||||
thiserror = "1.0.37"
|
thiserror = "1.0.37"
|
||||||
|
|||||||
@ -12,7 +12,7 @@ repository.workspace = true
|
|||||||
name = "reth_libmdbx"
|
name = "reth_libmdbx"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = "2"
|
bitflags.workspace = true
|
||||||
byteorder = "1"
|
byteorder = "1"
|
||||||
derive_more = "0.99"
|
derive_more = "0.99"
|
||||||
indexmap = "1"
|
indexmap = "1"
|
||||||
|
|||||||
@ -38,7 +38,7 @@ thiserror.workspace = true
|
|||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
serde = { workspace = true, features = ["derive", "rc"], optional = true }
|
serde = { workspace = true, features = ["derive", "rc"], optional = true }
|
||||||
fnv = "1.0.7"
|
fnv = "1.0.7"
|
||||||
bitflags = "1.3"
|
bitflags.workspace = true
|
||||||
auto_impl = "1.0"
|
auto_impl = "1.0"
|
||||||
|
|
||||||
# testing
|
# testing
|
||||||
|
|||||||
@ -2,7 +2,7 @@ bitflags::bitflags! {
|
|||||||
/// Marker to represents the current state of a transaction in the pool and from which the corresponding sub-pool is derived, depending on what bits are set.
|
/// Marker to represents the current state of a transaction in the pool and from which the corresponding sub-pool is derived, depending on what bits are set.
|
||||||
///
|
///
|
||||||
/// This mirrors [erigon's ephemeral state field](https://github.com/ledgerwatch/erigon/wiki/Transaction-Pool-Design#ordering-function).
|
/// This mirrors [erigon's ephemeral state field](https://github.com/ledgerwatch/erigon/wiki/Transaction-Pool-Design#ordering-function).
|
||||||
#[derive(Default)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, PartialOrd, Ord)]
|
||||||
pub(crate) struct TxState: u8 {
|
pub(crate) struct TxState: u8 {
|
||||||
/// Set to `1` if all ancestor transactions are pending.
|
/// Set to `1` if all ancestor transactions are pending.
|
||||||
const NO_PARKED_ANCESTORS = 0b100000;
|
const NO_PARKED_ANCESTORS = 0b100000;
|
||||||
@ -20,11 +20,11 @@ bitflags::bitflags! {
|
|||||||
/// Set to 1 if `feeCap` of the transaction meets the requirement of the pending block.
|
/// Set to 1 if `feeCap` of the transaction meets the requirement of the pending block.
|
||||||
const ENOUGH_FEE_CAP_BLOCK = 0b000010;
|
const ENOUGH_FEE_CAP_BLOCK = 0b000010;
|
||||||
|
|
||||||
const PENDING_POOL_BITS = Self::NO_PARKED_ANCESTORS.bits | Self::NO_NONCE_GAPS.bits | Self::ENOUGH_BALANCE.bits | Self::NOT_TOO_MUCH_GAS.bits | Self::ENOUGH_FEE_CAP_BLOCK.bits;
|
const PENDING_POOL_BITS = Self::NO_PARKED_ANCESTORS.bits()| Self::NO_NONCE_GAPS.bits() | Self::ENOUGH_BALANCE.bits() | Self::NOT_TOO_MUCH_GAS.bits() | Self::ENOUGH_FEE_CAP_BLOCK.bits();
|
||||||
|
|
||||||
const BASE_FEE_POOL_BITS = Self::NO_PARKED_ANCESTORS.bits | Self::NO_NONCE_GAPS.bits | Self::ENOUGH_BALANCE.bits | Self::NOT_TOO_MUCH_GAS.bits;
|
const BASE_FEE_POOL_BITS = Self::NO_PARKED_ANCESTORS.bits() | Self::NO_NONCE_GAPS.bits() | Self::ENOUGH_BALANCE.bits() | Self::NOT_TOO_MUCH_GAS.bits();
|
||||||
|
|
||||||
const QUEUED_POOL_BITS = Self::NO_PARKED_ANCESTORS.bits;
|
const QUEUED_POOL_BITS = Self::NO_PARKED_ANCESTORS.bits();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user