Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

eth_uninstallFilter should return false for non-existent filter #8280

Merged
merged 2 commits into from
Mar 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rpc/src/v1/helpers/poll_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ impl<F, T> PollManager<F, T> where T: Timer {
}

/// Removes poll info.
pub fn remove_poll(&mut self, id: &PollId) {
self.polls.remove(id);
pub fn remove_poll(&mut self, id: &PollId) -> bool {
self.polls.remove(id).is_some()
}
}

Expand Down
3 changes: 1 addition & 2 deletions rpc/src/v1/impls/eth_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ impl<T: Filterable + Send + Sync + 'static> EthFilter for T {
}

fn uninstall_filter(&self, index: Index) -> Result<bool> {
self.polls().lock().remove_poll(&index.value());
Ok(true)
Ok(self.polls().lock().remove_poll(&index.value()))
}
}