prusnak / suez

Tool for pretty printing and optimizing Lightning Network channels.
GNU General Public License v3.0
78 stars 20 forks source link

Filter out inactive channels when retrieving channel info #13

Closed sipsorcery closed 3 years ago

sipsorcery commented 3 years ago

lncli getchaninfo returns an error is passed an inactive channel ID.

[lncli] rpc error: code = Unknown desc = edge not found

prusnak commented 3 years ago

What version of lnd are you using? For me, it works ....

sipsorcery commented 3 years ago

What version of lnd are you using?

The latest:

$ lncli --version lncli version 0.12.1-beta commit=v0.12.1-beta

For me, it works ....

Are you sure though? Inactive channels seem somewhat rare. Do you get a match with:

lncli listchannels | grep '"active": false'

I currently have an inactive channel due to a remote peer not responding. The suez script gives me a traceback without this fix.

prusnak commented 3 years ago

I am pretty sure, I had inactive channels when I was adding this feature: https://github.com/prusnak/suez/commit/37ff31235c26b768448cd5409a34d5270a2aa75d

I don't want to drop inactive channels from the list anyway. So I'd rather do the following:

https://github.com/prusnak/suez/commit/487724a980429396a0f63dd2fff87febabbdca65

Can you please confirm the commit above fixes the issue for you?

sipsorcery commented 3 years ago

Can you please confirm the commit above fixes the issue for you?

I can't test the latest version at the moment due to #12. Once I solve that I'll check it.

prusnak commented 3 years ago

Ok, closing this.

sipsorcery commented 3 years ago

The problem is fixed. A lncli warning now shows up at the top of the chart but that's only cosmetic:

lncli edge not found warning