Skip to content

Commit

Permalink
node: Add mempool params to fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Goshawk committed Aug 14, 2024
1 parent 6152a14 commit 8395a1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion node/src/database/rocksdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ impl<'db, DB: DBAccess> Mempool for DBTransaction<'db, DB> {

let timestamp = timestamp.to_be_bytes();

// Map Fee_Hash to Expiry
// Map Fee_Hash to Timestamp
// Key pair is used to facilitate sort-by-fee
// Also, the timestamp is used to remove expired transactions
self.put_cf(
Expand Down
10 changes: 9 additions & 1 deletion node/src/mempool/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ impl Default for Params {

impl std::fmt::Display for Params {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "max_queue_size: {}", self.max_queue_size)
write!(
f,
"max_queue_size: {}, max_mempool_txn_count: {},
idle_interval: {:?}, mempool_expiry: {:?}",
self.max_queue_size,
self.max_mempool_txn_count,
self.idle_interval,
self.mempool_expiry
)
}
}

0 comments on commit 8395a1f

Please sign in to comment.