andrewtoth / paythrough

CoreLightning plugin to pay through a specific channel
MIT License
4 stars 1 forks source link

Paythrough crashes if any channel is not in normal state #1

Closed karmkod closed 2 years ago

karmkod commented 2 years ago

When a channel is in CHANNELD_AWAITING_LOCKIN ,listpeers does not return scid. I made this change locally to fix it: channels = list(filter(lambda channel: channel['state'] == 'CHANNELD_NORMAL' and channel['short_channel_id'] != scid, channels))

Also had to comment out these lines: if len(channels) != channels_length-1: # We should have one less channel return { 'code': -1, 'message': f'Short channel id {scid} is not valid' }

It works for me locally now but creating issue just to let you and others know if they encounter it.

andrewtoth commented 2 years ago

Thank you for the bug report! This should be fixed in 18654fd339b1264c93031f3469180bd819b903b0.