]> git.bitcoin.ninja Git - rust-lightning/commit
Avoid disconnecting all peers if user code is slow
authorMatt Corallo <git@bluematt.me>
Sun, 26 Sep 2021 00:09:17 +0000 (00:09 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 21 Jan 2022 00:36:59 +0000 (00:36 +0000)
commit8f5023a006ed0bdc08432c0c283e28d77ab3bc72
tree6f9c7c6c8135cdc46face0daa30c2a557b743443
parentd741fb14fa05e3ca8da01f2f38d068c02897ab31
Avoid disconnecting all peers if user code is slow

In the sample client (and likely other downstream users), event
processing may block on slow operations (e.g. Bitcoin Core RPCs)
and ChannelManager persistence may take some time. This should be
fine, except that we consider this a case of possible backgrounding
and disconnect all of our peers when it happens.

Instead, we here avoid considering event processing time in the
time between PeerManager events.
lightning-background-processor/src/lib.rs