Skip to content

Stop haphazardly passing InitFeatures in message handlers #1954

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

Closed
TheBlueMatt opened this issue Jan 15, 2023 · 4 comments
Closed

Stop haphazardly passing InitFeatures in message handlers #1954

TheBlueMatt opened this issue Jan 15, 2023 · 4 comments
Labels
good first issue Good for newcomers

Comments

@TheBlueMatt
Copy link
Collaborator

handle_{shutdown,open_channel,accept_channel} etc methods all take an InitFeatures parameter because ChannelManager needed it and it was the cheapest way to pass them through. We could pass them through on every message handler, but there's little reason to since ChannelManager caches the last InitFeatures in the peer state anyway, and it would clean up the interface to just remove it.

@TheBlueMatt TheBlueMatt added the good first issue Good for newcomers label Jan 15, 2023
@TheBlueMatt
Copy link
Collaborator Author

This should be pretty easy to tackle - just remove the InitFeatures parameters from the message handlers, replacing the access to them in ChannelManager with the version stored in per_peer_state.

@danielgranhao
Copy link
Contributor

If no one has yet, I can try to tackle this.

@TheBlueMatt
Copy link
Collaborator Author

Do it!

@TheBlueMatt
Copy link
Collaborator Author

Fixed by #1959

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants