Skip to content

Introduce a Channel-specific Err type and return it in a few places #201

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

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

This is way simpler than writing out the whole ErrorAction mess and we can just convert it as appropriate in ChannelManager. This may make #153 a bit easier to address - by using an intermediate Err type we can just say "fail this channel, but ChannelManager can figure out if we should ban/disconnect/etc based on whether we have other channels with this peer". It also has no Options for actions, which steps us forward on #129 for BOLT 2 as we migrate to it.

ChannelError::Ignore(msg) => HandleError {
err: msg,
action: Some(msgs::ErrorAction::IgnoreError),
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is action: None different from Some(IgnoreError)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

action: None -> Not yet filled in (ie TODO), action: Some(IgnoreError) -> Just stop procsesing without error.

@ariard
Copy link

ariard commented Oct 1, 2018

Concept ACK, I'll have more time tomorrow to review it if you still need it!

@TheBlueMatt
Copy link
Collaborator Author

TheBlueMatt commented Oct 1, 2018 via email

@ariard
Copy link

ariard commented Oct 1, 2018

Ah okay, I've had quick skim on it, looked the update_fail_malformed_htlc, nothing shocks me feel free to go ahead

@TheBlueMatt TheBlueMatt merged commit 84953fc into lightningdevkit:master Oct 1, 2018
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