lightningdevkit / lightning-liquidity

Other
27 stars 17 forks source link

LSPS2: DRY logic around getting next payment from queue #135

Open johncantrell97 opened 5 months ago

johncantrell97 commented 5 months ago

Based on #137

In htlc_intercepted, htlc_handling_failed, channel_ready, and payment_forwarded (in #134) we try to get a payment from the queue and construct the new state and a forward payment action from it. The code is identical in all four cases so this extracts it to a single function.