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.
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
Clean up and more liberally free holding cell HTLCs #756
Clean up and more liberally free holding cell HTLCs #756
Changes from 1 commit
6d99c89
f5451ec
6170828
eb0b664
49c7b01
6e865ea
e7a4908
daedbbe
81cd1ad
d0a8a90
627df71
6b22abd
76db5db
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Since we now have the whole
process_background_events
thing, I wonder if it'd ease the reentrancy concerns a bit to shift this call over there?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.
I'm not a fan of using that for this because its hooked on the one minute timer which may take a while...however, I think it makes sense in get_and_clear_pending_msg_events. Going to open a new PR with that.
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.
This line also adds reentrancy risk, right? (in addition to the reentrancy risk of freeing the holding cell HTLCs)
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.
I don't believe so, at least not from the PoV of calling user code -
handle_error
shouldn't ever call user code directly, only pushing events onto the message/regular event queues.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.
Oh, it's hard to untangle the macros, but
handle_error
does callfinish_force_close
, which looks like it can callupdate_channel
.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.
Ah! I see your point. Tracing it back a bit, I think the only way we have an
Err
inres
here is if we break thehandle_chan_restoration_locked
loop with ahandle_monitor_err
result, which is precisely only if the monitor update that we generated failed.