Skip to content

Commit

Permalink
Fix filter to_block
Browse files Browse the repository at this point in the history
  • Loading branch information
tgmichel committed Oct 1, 2020
1 parent c288899 commit e15a6cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rpc/src/eth_pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,14 @@ impl<B: BlockT, P, C, BE, SC, H: ExHashT> EthPubSubApi<B, P, C, BE, SC, H> where
params: Option<Params>
) -> (Option<u32>, Option<u32>) {
if let Some(Params::Logs(f)) = params {
let to_block: Option<u32> = if f.to_block.is_some() {
self.native_block_number(f.to_block).unwrap_or(None)
} else {
None
};
return (
self.native_block_number(f.from_block).unwrap_or(None),
self.native_block_number(f.to_block).unwrap_or(None)
to_block
);
}
(None, None)
Expand Down

0 comments on commit e15a6cc

Please sign in to comment.