Skip to content

Commit

Permalink
Apply PR code review suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Eval EXEC <[email protected]>
  • Loading branch information
eval-exec committed Jul 25, 2024
1 parent 598efac commit 58b0027
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions chain/src/consume_unverified.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ impl ConsumeUnverifiedBlocks {

pub(crate) fn start(mut self) {
loop {
let _trace_begin_loop = minstant::Instant::now();
let trace_begin_loop = minstant::Instant::now();
select! {
recv(self.unverified_block_rx) -> msg => match msg {
Ok(unverified_task) => {
// process this unverified block
if let Some(handle) = ckb_metrics::handle() {
handle.ckb_chain_consume_unverified_block_waiting_block_duration.observe(_trace_begin_loop.elapsed().as_secs_f64())
handle.ckb_chain_consume_unverified_block_waiting_block_duration.observe(trace_begin_loop.elapsed().as_secs_f64())
}
let _ = self.tx_pool_controller.suspend_chunk_process();

Expand All @@ -98,7 +98,7 @@ impl ConsumeUnverifiedBlocks {
let _ = self.tx_pool_controller.continue_chunk_process();
},
Err(err) => {
info!("truncate_block_tx has been closed,err: {}", err);
info!("truncate_block_tx has been closed, err: {}", err);
return;
},
},
Expand Down Expand Up @@ -883,8 +883,6 @@ impl ConsumeUnverifiedBlockProcessor {

self.shared.store_snapshot(Arc::clone(&new_snapshot));

// NOTE: Dont update tx-pool when truncate

Ok(())
}
}
Expand Down

0 comments on commit 58b0027

Please sign in to comment.