Skip to content

Commit

Permalink
Remove unnecessary code in Filter api (paritytech#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgmichel authored Jul 4, 2022
1 parent 24ba917 commit c52d5e8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions client/rpc/src/eth/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,15 +326,11 @@ where
current_number = best_number;
}

if current_number > client.info().best_number {
current_number = client.info().best_number;
}

let from_number = filter
.from_block
.and_then(|v| v.to_min_block_num())
.map(|s| s.unique_saturated_into())
.unwrap_or(client.info().best_number);
.unwrap_or(best_number);

let mut ret: Vec<Log> = Vec::new();
let _ = filter_range_logs(
Expand Down Expand Up @@ -411,7 +407,7 @@ where
.from_block
.and_then(|v| v.to_min_block_num())
.map(|s| s.unique_saturated_into())
.unwrap_or(client.info().best_number);
.unwrap_or(best_number);

let _ = filter_range_logs(
client.as_ref(),
Expand Down

0 comments on commit c52d5e8

Please sign in to comment.