Skip to content

Commit

Permalink
Merge pull request #4 from PureStake/tgmichel-pubsub-fix
Browse files Browse the repository at this point in the history
Fix filter `to_block`
  • Loading branch information
tgmichel authored Oct 2, 2020
2 parents 7650b82 + e15a6cc commit 0546a58
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 @@ -108,9 +108,14 @@ impl<B: BlockT, P, C, BE, H: ExHashT> EthPubSubApi<B, P, C, BE, 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 0546a58

Please sign in to comment.