Skip to content

Handle network updates from failed payments in BackgroundProcessor - #1043

Merged
TheBlueMatt merged 10 commits into
lightningdevkit:mainfrom
jkczyz:2021-07-network-update-handler
Sep 15, 2021
Merged

TheBlueMatt merged 10 commits into
lightningdevkit:mainfrom
jkczyz:2021-07-network-update-handler

Conversation

@jkczyz

@jkczyz jkczyz commented Aug 14, 2021 •

Copy link
Copy Markdown
Contributor

MessageSendEvent::PaymentFailureNetworkUpdate served as a hack to pass an HTLCFailChannelUpdate from ChannelManager to NetGraphMsgHandler via PeerManager. Instead, remove the event entirely and move the contained
data (renamed NetworkUpdate) into Event::PaymentFailed to be processed by an event handler.

This requires making NetGraphMsgHandler an EventHandler, which is used in BackgroundProcessor to decorate the user-provided EventHandler with the ability to update the NetworkGraph accordingly.

The general concept of intercepting events via a decorator will be used in a follow-up PR for scoring channels and retrying failed payments.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants