Skip to content

Commit

Permalink
removed debug logs and statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Shourya742 committed Nov 13, 2024
1 parent 367bbc1 commit bf06bce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
7 changes: 3 additions & 4 deletions roles/jd-server/src/lib/job_declarator/message_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ impl ParseClientJobDeclarationMessages for JobDeclaratorDownstream {
.known_transactions
.append(&mut known_transactions);

dbg!(missing_txs.len());
if missing_txs.is_empty() {
let message_success = DeclareMiningJobSuccess {
request_id: message.request_id,
Expand Down Expand Up @@ -260,19 +259,19 @@ fn clear_declared_mining_job(
Some(Some((_transaction, counter))) => {
if *counter > 1 {
*counter -= 1;
info!(
debug!(
"Fat transaction {:?} counter decremented; job id {:?} dropped",
txid, old_mining_job.request_id
);
} else {
mempool_.mempool.remove(&txid);
info!(
debug!(
"Fat transaction {:?} with job id {:?} removed from mempool",
txid, old_mining_job.request_id
);
}
}
Some(None) => info!(
Some(None) => debug!(
"Thin transaction {:?} with job id {:?} removed from mempool",
txid, old_mining_job.request_id
),
Expand Down
9 changes: 0 additions & 9 deletions roles/jd-server/src/lib/mempool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ impl JDsMempool {

// fill in the mempool the transactions given in input
for transaction in transactions {
dbg!(transaction.txid());
let _ = self_.safe_lock(|a| {
a.mempool
.entry(transaction.txid())
Expand All @@ -123,9 +122,6 @@ impl JDsMempool {

let mempool = client.get_raw_mempool().await?;

dbg!("raw Mempool size");
dbg!(mempool.len());

let raw_mempool_txids: Result<Vec<Txid>, _> = mempool
.into_iter()
.map(|id| {
Expand All @@ -138,14 +134,9 @@ impl JDsMempool {

// Holding the lock till the light mempool updation is complete.
let is_mempool_empty = self_.safe_lock(|x| {
dbg!("Before Update");
dbg!(x.mempool.len());
x.mempool.retain(|_, v| v.is_some());
raw_mempool_txids.iter().for_each(|txid| {
x.mempool.entry(*txid).or_insert(None);
});
dbg!("After Update");
dbg!(x.mempool.len());
x.mempool.is_empty()
})?;

Expand Down

0 comments on commit bf06bce

Please sign in to comment.