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 Aug 1, 2024
1 parent 40ea0c6 commit 59c2cdd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 186 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
180 changes: 0 additions & 180 deletions devtools/block_sync/draw_sync_chart.py

This file was deleted.

1 change: 0 additions & 1 deletion sync/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,6 @@ pub struct SyncState {
pending_get_block_proposals: DashMap<packed::ProposalShortId, HashSet<PeerIndex>>,
pending_get_headers: RwLock<LruCache<(PeerIndex, Byte32), Instant>>,
pending_compact_blocks: Mutex<PendingCompactBlockMap>,
// orphan_block_pool: OrphanBlockPool,

/* In-flight items for which we request to peers, but not got the responses yet */
inflight_proposals: DashMap<packed::ProposalShortId, BlockNumber>,
Expand Down

0 comments on commit 59c2cdd

Please sign in to comment.