Skip to content

Commit

Permalink
Merge pull request #4641 from eval-exec/exec/fix-block-filter-exit-si…
Browse files Browse the repository at this point in the history
…gnal

Let BlockFilter exit if ckb has received exit signal
  • Loading branch information
quake authored Sep 13, 2024
2 parents d14e23b + 04cd127 commit b314c85
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 b314c85

Please sign in to comment.