mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(txpool): fix some format and typo (#6481)
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
@ -28,5 +28,5 @@ graph TB
|
||||
B1 --> |increased base fee| B2
|
||||
B2 --> |decreased base fee| B1
|
||||
B3 --> |promote| B1
|
||||
B3 --> |promote| B2
|
||||
new --> |apply state changes| pool
|
||||
B3 --> |promote| B2
|
||||
new --> |apply state changes| pool
|
||||
|
||||
@ -91,7 +91,7 @@ impl TransactionId {
|
||||
/// Returns the `TransactionId` this transaction depends on.
|
||||
///
|
||||
/// This returns `transaction_nonce - 1` if `transaction_nonce` is higher than the
|
||||
/// `on_chain_none`
|
||||
/// `on_chain_nonce`
|
||||
pub fn ancestor(
|
||||
transaction_nonce: u64,
|
||||
on_chain_nonce: u64,
|
||||
@ -114,7 +114,7 @@ impl TransactionId {
|
||||
TransactionId::new(self.sender, self.nonce + 1)
|
||||
}
|
||||
|
||||
/// Returns the nonce the follows directly after this.
|
||||
/// Returns the nonce that follows immediately after this one.
|
||||
#[inline]
|
||||
pub(crate) const fn next_nonce(&self) -> u64 {
|
||||
self.nonce + 1
|
||||
|
||||
@ -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.
|
||||
///
|
||||
/// This mirrors [erigon's ephemeral state field](https://github.com/ledgerwatch/erigon/wiki/Transaction-Pool-Design#ordering-function).
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, PartialOrd, Ord)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, PartialOrd, Ord)]
|
||||
pub(crate) struct TxState: u8 {
|
||||
/// Set to `1` if all ancestor transactions are pending.
|
||||
const NO_PARKED_ANCESTORS = 0b10000000;
|
||||
|
||||
Reference in New Issue
Block a user