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.
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.