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

rpc: event websocket subscription #308

Merged
merged 49 commits into from
Jul 3, 2020
Merged

rpc: event websocket subscription #308

merged 49 commits into from
Jul 3, 2020

Conversation

fedekunze
Copy link
Contributor

@fedekunze fedekunze commented May 19, 2020

Closes: #330

Description

  • Subscribe to filters
  • Unsubscribe
    • PendingTxs
  • Timeout unsubscribe after 5 min
  • retreive events from GetFilterChanges

For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@fedekunze fedekunze mentioned this pull request Jun 8, 2020
6 tasks
@fedekunze fedekunze marked this pull request as ready for review July 3, 2020 09:03
@fedekunze fedekunze requested a review from noot as a code owner July 3, 2020 09:03
@fedekunze fedekunze self-assigned this Jul 3, 2020
rpc/filter_api.go Outdated Show resolved Hide resolved
rpc/filter_api.go Outdated Show resolved Hide resolved
rpc/filter_api.go Outdated Show resolved Hide resolved
rpc/filter_api.go Outdated Show resolved Hide resolved
txsCh <-chan coretypes.ResultEvent // Channel to receive new pending transactions event
logsCh <-chan coretypes.ResultEvent // Channel to receive new log event
pendingLogsCh <-chan coretypes.ResultEvent // Channel to receive new pending log event
// rmLogsCh <-chan coretypes.ResultEvent // Channel to receive removed log event
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it's used on Geth but idk what is considered a removed log in our case

rpc/types.go Outdated Show resolved Hide resolved
Copy link
Contributor

@noot noot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, great work!! just a few small comments

@fedekunze fedekunze merged commit 20e9b2e into development Jul 3, 2020
@fedekunze fedekunze deleted the rpc-websocket branch July 3, 2020 15:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event filter of transactions
2 participants