You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I reckon we could improve/simplify the EventSubscription struct. Some thoughts:
Impl Stream (and so the StreamExt methods), so that the filtering logic can be (mostly?) moved out of this struct.
Remove filtering on events from a specific block (if needed, add a separate method to obtain events from a single block which potentially returns the same event stream as we'd get here; this method could be reused in the transaction.rs stuff too if it existed).
Remove filtering of events from a specific extrinsic (we get this now via the API in transaction.rs, and ideally it would be easy to manually filter the Stream for such events).
Remove filtering of events by pallet/event index; make it easy to do so via the Stream.
Update transfer_subscribe example to subscribe to events separately from making any transaction, and show off filtering and such. If needed, make transactions etc in a separate thread just to produce the desired events. (why? we shouldn't use this to get events for the current transaction as we have a proper API for that; but that's what the example seems to do).
Possibly add other examples.
The text was updated successfully, but these errors were encountered:
I reckon we could improve/simplify the
EventSubscription
struct. Some thoughts:Stream
(and so theStreamExt
methods), so that the filtering logic can be (mostly?) moved out of this struct.transaction.rs
stuff too if it existed).transaction.rs
, and ideally it would be easy to manually filter the Stream for such events).transfer_subscribe
example to subscribe to events separately from making any transaction, and show off filtering and such. If needed, make transactions etc in a separate thread just to produce the desired events. (why? we shouldn't use this to get events for the current transaction as we have a proper API for that; but that's what the example seems to do).The text was updated successfully, but these errors were encountered: