Skip to content

Commit

Permalink
Let BlockFilter exit if ckb has received exit signal
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Sep 11, 2024
1 parent 18c68f5 commit a305651
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions block-filter/src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ impl BlockFilter {
};

for block_number in start_number..=tip_header.number() {
if ckb_stop_handler::has_received_stop_signal() {
info!("ckb has received stop signal, BlockFilter exit now")
return;
}

let block_hash = snapshot.get_block_hash(block_number).expect("index stored");
let header = snapshot
.get_block_header(&block_hash)
Expand Down

0 comments on commit a305651

Please sign in to comment.