From e15a6cc8568252c06b4997ecf5ee6c2042ed7dc6 Mon Sep 17 00:00:00 2001 From: tgmichel Date: Thu, 1 Oct 2020 19:23:12 +0200 Subject: [PATCH] Fix filter `to_block` --- rpc/src/eth_pubsub.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rpc/src/eth_pubsub.rs b/rpc/src/eth_pubsub.rs index a9701772e9..06a2d54d8c 100644 --- a/rpc/src/eth_pubsub.rs +++ b/rpc/src/eth_pubsub.rs @@ -116,9 +116,14 @@ impl EthPubSubApi where params: Option ) -> (Option, Option) { if let Some(Params::Logs(f)) = params { + let to_block: Option = 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)