-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blockchain events subscription #77
Merged
Merged
Changes from 31 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
8da4629
Add `pallet-ddc-clusters` events type definitions
khssnv 91aef79
Add event retriever to the client
khssnv c9bd637
Store pallets' subscription to events in client
khssnv 8212a4f
New client method to start listening to events
khssnv 796555f
New generic events subscription type
khssnv d9b9d14
New events subscriber type
khssnv 4a6ef91
New events publisher interface
khssnv 1501773
A func to add buffered subscription to Publisher
khssnv 0bbdfe2
Impl Publisher interface on ddcClustersApi
khssnv f53d0cf
Subscribe ddcClustersApi to block events
khssnv 7b9cd80
Event DdcClusters.ClusterNodeAdded subscription
khssnv caa807b
Reshape events to remove events retriever
khssnv d2fa6dc
Create chain custom event records type
khssnv 75bdbb1
Add event unsubscription callback
khssnv 1cc6353
Remove Publisher interface
khssnv 9a29fcc
Generic events subscriber
khssnv a646067
Filter specific block events for subscribers
khssnv d1158d0
Remove events retriever, listen to storage changes
khssnv ee5d949
Upgrade `go-substrate-rpc-client` to `v4.2.1`
khssnv 67a3abc
Add `DdcClusters_ClusterCreated` events subscriber
khssnv c344094
Add `pallet-ddc-customers` event types
khssnv d3bcb3a
Track `ddc-customers` events subscribers
khssnv 0214d43
Add `ddc-customers` events subscription
khssnv daae22b
Pass block events to `ddc-customers` subscribers
khssnv ccc8ddc
Add `pallet-ddc-payouts` event types
khssnv edda198
Add `ddc-payouts` events subscription
khssnv 4d6a045
Pass block events to `ddc-payouts` subscribers
khssnv 40ca238
Unify parameter naming
khssnv c0f64b7
Implement remaining events subs for `ddc-clusters`
khssnv 3abdee1
Callbacks based blockchain events listener
khssnv 2966920
Revert multiple commits with older events sub impl
khssnv 19c6706
Ignore duplicate attempt to start event listening
khssnv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what would happen in case this is called twice? shouldn't we rewrite it somehow so the client can be subscribed to changes only once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. Now we can freely call it twice and concurrently. It will ignore a duplicate attempt to start events listening (until its stopped) and just returns an existing stopper function and errors channel.