chore(txpool): fix some format and typo (#6481)

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
Delweng
2024-02-08 09:57:32 +08:00
committed by GitHub
parent 02c3f85863
commit 281486c552
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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;