Free the holding cells during background timer ticks
authorMatt Corallo <git@bluematt.me>
Mon, 21 Nov 2022 01:22:51 +0000 (01:22 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 6 Dec 2022 18:18:26 +0000 (18:18 +0000)
commit153137804049ca92e869353dd13c2ae219ad7163
tree667e5d9e29e79e14a762a9860552c573161d84cb
parentcae7c8180b2e0c994bbc28ed514abccb90a4018e
Free the holding cells during background timer ticks

We currently free the channel holding cells in
`get_and_clear_pending_msg_events`, blocking outbound messages
while we do so. This is fine, but may block the message pipeline
longer than we need to. In the next commit we'll push
timer-originating channel fee updates out through the holding cell
pipeline, leaning more on that freeing in the future.

Thus, to avoid a regression in message time, here we clear the
holding cell after processing all timer events. This also avoids
needing to change tests in the next commit.
lightning/src/ln/channelmanager.rs