Skip to content
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

[WIP] Refactor at Client.fetch_peers extraction channel_id #1171

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kai3341
Copy link
Contributor

@kai3341 kai3341 commented Dec 18, 2022

It's too difficult to read this code. I simplified if

@kai3341
Copy link
Contributor Author

kai3341 commented Dec 18, 2022

It looks it's first step of refactoring. Now it's easy to see:
-- channel_id at Client.fetch_peers uses only in one case but calculates always. Maybe it would be good idea to put its calculation exactly there where it used
-- maybe instead of getattr(..., ..., None) or getattr(..., ..., None) it would be good idea to use getattr(..., ..., getattr(..., ..., None))
-- maybe invert getattr action order
-- maybe extract attr via type checking

@kai3341
Copy link
Contributor Author

kai3341 commented Dec 19, 2022

I found patchy so I'm solving my issues
@delivrance you may close this PR. It change nothing in behavior

@kai3341 kai3341 changed the title Refactor at Client.fetch_peers extraction channel_id [WIP] Refactor at Client.fetch_peers extraction channel_id Dec 24, 2022
@kai3341
Copy link
Contributor Author

kai3341 commented Dec 24, 2022

I have some ideas, so I'll implement it, push it and then remove WIP status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant