From c964b4796f067f7ecebdd9dc71d997b2ea343a4f Mon Sep 17 00:00:00 2001 From: Max Fang Date: Tue, 9 Aug 2022 21:47:56 -0700 Subject: [PATCH] Revert "node: Use get_persistence_condvar_value" This reverts commit 8422fdd896d9b2f2f8340336118a42a2c39ccfe7. The `await_persistable_update_timeout(Duration::from_millis(10))` 'poll' hack is fine for now while we wait for the permanent solution to be merged into LDK. Removing usage of `get_persistence_condvar_value` allows us to move back to the version of LDK on crates.io once we upgrade LDK to v0.0.110. [0] https://github.com/lightningdevkit/rust-lightning/pull/1657 --- node/src/lexe/background_processor.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node/src/lexe/background_processor.rs b/node/src/lexe/background_processor.rs index aa8696985..8e98b63ff 100644 --- a/node/src/lexe/background_processor.rs +++ b/node/src/lexe/background_processor.rs @@ -74,8 +74,10 @@ impl LexeBackgroundProcessor { // --- Persistence branches --- // _ = cm_poll_timer.tick() => { trace!("Polling channel manager for updates"); + // TODO Use get_persistence_condvar_value instead + let timeout = Duration::from_millis(10); let needs_persist = channel_manager - .get_persistence_condvar_value(); + .await_persistable_update_timeout(timeout); if needs_persist { let persist_res = persister .persist_manager(channel_manager.deref())