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

Channels: Open, List & Close #82

Merged
merged 7 commits into from
May 9, 2022
Merged

Channels: Open, List & Close #82

merged 7 commits into from
May 9, 2022

Conversation

rootzoll
Copy link
Collaborator

@rootzoll rootzoll commented May 8, 2022

implementation just for LND - core lightning still throws an NOT IMPELEMENTED error

@lgtm-com
Copy link

lgtm-com bot commented May 8, 2022

This pull request introduces 4 alerts when merging 2ce10c6 into ce7f82c - view on LGTM.com

new alerts:

  • 2 for Unreachable code
  • 1 for Redundant comparison
  • 1 for Unused import

@rootzoll
Copy link
Collaborator Author

rootzoll commented May 9, 2022

@fusion44 please check this PR for merging so that @cstenglein can use it for the WebUI channel management


@classmethod
def from_grpc_pending(cls, c) -> "Channel":
print(str(c))
Copy link
Owner

Choose a reason for hiding this comment

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

Probably left accidentally?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thats needed and in use ... its to parse channel info from grpc opening pending channels objects, that are slightly different from already active channels - so a special parsing method was needed

Copy link
Owner

Choose a reason for hiding this comment

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

The print statement?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah Ok - thats gone now

try:
await lncfg.lnd_stub.ConnectPeer(r)
#print("CONNECTED TO PEER")
#print(str(pubkey))
Copy link
Owner

Choose a reason for hiding this comment

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

These commented out print statements could be removed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should be removed now

async for response in lncfg.lnd_stub.CloseChannel(request):
#print(str(response))
# TODO: this is still some bytestring that needs correct convertion to a string txid (ok OK for now)
return str(response.close_pending.txid)
Copy link
Owner

Choose a reason for hiding this comment

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

I think response.close_pending.txid.hex() should do the trick.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

testing with hex() now

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok looks good on first test

Copy link
Owner

@fusion44 fusion44 left a comment

Choose a reason for hiding this comment

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

Thank you! I'd like to request a few small changes though :) Please see my comments.

Copy link
Owner

@fusion44 fusion44 left a comment

Choose a reason for hiding this comment

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

LGTM!

@cstenglein
Copy link
Collaborator

closes #36
closes #35

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