Skip to content

Commit

Permalink
Revert "node: Use get_persistence_condvar_value"
Browse files Browse the repository at this point in the history
This reverts commit 8422fdd.

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] lightningdevkit/rust-lightning#1657
  • Loading branch information
MaxFangX committed Aug 10, 2022
1 parent f03aaee commit c964b47
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion node/src/lexe/background_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit c964b47

Please sign in to comment.