Add event kind filtering to event subscriptions - #300
Open
benthecarman wants to merge 3 commits into
Open
benthecarman wants to merge 3 commits into
benthecarman wants to merge 3 commits into
Conversation
|
I've assigned @TheBlueMatt as a reviewer! |
benthecarman
force-pushed
the
spiffy-hippo
branch
from
September 28, 2026 23:35
2d4520e to
b3cebfa
Compare
joostjager
reviewed
Sep 29, 2026
benthecarman
force-pushed
the
spiffy-hippo
branch
from
September 29, 2026 05:57
b3cebfa to
f8f53f5
Compare
Move the SubscribeEvents streaming loop out of the request dispatch match into its own function so it can be reused by additional event streaming RPCs. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SubscribeEvents delivers every event, so clients that only care about one kind of event have to receive and discard everything else. Add SubscribeChannelEvents, SubscribePaymentEvents, and SubscribeForwardingEvents RPCs, which stream only the matching subset of events. SubscribeEvents is unchanged. Channel events are ChannelStateChanged, SpliceNegotiated, and SpliceNegotiationFailed. Payment events are PaymentReceived, PaymentSuccessful, PaymentFailed, and PaymentClaimable. Forwarding events are PaymentForwarded; they get their own stream because they are the highest-volume event on a routing node and are not this node's own payments. Based on an earlier contribution that added an event kind filter to SubscribeEventsRequest; reworked into separate RPCs per review. Co-authored-by: Ekong Jemimah <ekongjemimah@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pay --wait only looks at PaymentSuccessful and PaymentFailed events, so subscribe to payment events rather than every server event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
benthecarman
force-pushed
the
spiffy-hippo
branch
from
September 29, 2026 20:02
f8f53f5 to
ac49ed5
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Recreated #232
Instead of needing a global subscription for all events and requiring the user to filter themselves, we can instead have separate subs for different kinds. For now we add ones for channel events, payments, and forwards.
This allowed for one small clean up in the
pay --waitcli