Skip to content

Commit

Permalink
fix: resolve update script block number error
Browse files Browse the repository at this point in the history
  • Loading branch information
quake committed Dec 15, 2023
1 parent 89be070 commit 870a1f5
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 870a1f5

Please sign in to comment.