Skip to content

Commit

Permalink
Merge pull request #165 from quake/quake/fix-script-block-number
Browse files Browse the repository at this point in the history
fix: resolve update script block number error
  • Loading branch information
quake authored Dec 15, 2023
2 parents 89be070 + 870a1f5 commit e0a060a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/protocols/filter/components/block_filters_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ impl<'a> BlockFiltersProcess<'a> {
return Status::ok();
};

let mut matched_blocks = self
.filter
.peers
.matched_blocks()
.write()
.expect("poisoned");

let block_filters = self.message.to_entity();
let start_number: BlockNumber = block_filters.start_number().unpack();
let filters_count = block_filters.filters().len();
Expand Down Expand Up @@ -212,12 +219,6 @@ impl<'a> BlockFiltersProcess<'a> {
let tip_header = self.filter.storage.get_tip_header();
let filtered_block_number = start_number - 1 + actual_blocks_count as BlockNumber;

let mut matched_blocks = self
.filter
.peers
.matched_blocks()
.write()
.expect("poisoned");
if possible_match_blocks_len != 0 {
let blocks = possible_match_blocks
.iter()
Expand Down

0 comments on commit e0a060a

Please sign in to comment.