Skip to content

Commit 8c04d2e

Browse files
committed
update fork with fixes
1 parent b8135fb commit 8c04d2e

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

orange-sdk/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _cashu-tests = ["_test-utils", "cdk-ldk-node", "cdk/mint", "cdk-sqlite", "cdk-ax
1818
[dependencies]
1919
graduated-rebalancer = { path = "../graduated-rebalancer", version = "0.1.0" }
2020

21-
ldk-node = { git = "https://github.com/lightningdevkit/ldk-node.git", rev = "dd519080318ba099280b4353fb6335c587a67cbd" }
21+
ldk-node = { git = "https://github.com/lightningdevkit/ldk-node.git", rev = "6d91eabcb11bf3b32f0a2e5f43b55c98d84ba1f0" }
2222
lightning-macros = "0.2.0-beta1"
2323
bitcoin-payment-instructions = { workspace = true }
2424
chrono = { version = "0.4", default-features = false }
@@ -27,15 +27,15 @@ reqwest = { version = "0.12.23", default-features = false, features = ["rustls-t
2727
breez-sdk-spark = { git = "https://github.com/breez/spark-sdk.git", rev = "1c3dd78a40ae50a88d743110a79fa4a95d93d932", default-features = false, features = ["rustls-tls"], optional = true }
2828
tokio = { version = "1.0", default-features = false, features = ["rt-multi-thread", "sync"] }
2929
uuid = { version = "1.0", default-features = false, optional = true }
30-
cdk = { git = "https://github.com/benthecarman/cdk.git", rev = "6a8f046a405137cfbb3a77f1f045c3a238e62c00", default-features = false, features = ["wallet"], optional = true }
30+
cdk = { git = "https://github.com/benthecarman/cdk.git", rev = "62ac47d51d6c74c7b847ae0c19e7c84899efe872", default-features = false, features = ["wallet"], optional = true }
3131
serde_json = { version = "1.0", optional = true }
3232
async-trait = "0.1"
3333
log = "0.4.28"
3434

3535
corepc-node = { version = "0.8.0", features = ["29_0", "download"], optional = true }
36-
cdk-ldk-node = { git = "https://github.com/benthecarman/cdk.git", rev = "6a8f046a405137cfbb3a77f1f045c3a238e62c00", optional = true }
37-
cdk-sqlite = { git = "https://github.com/benthecarman/cdk.git", rev = "6a8f046a405137cfbb3a77f1f045c3a238e62c00", optional = true }
38-
cdk-axum = { git = "https://github.com/benthecarman/cdk.git", rev = "6a8f046a405137cfbb3a77f1f045c3a238e62c00", optional = true }
36+
cdk-ldk-node = { git = "https://github.com/benthecarman/cdk.git", rev = "62ac47d51d6c74c7b847ae0c19e7c84899efe872", optional = true }
37+
cdk-sqlite = { git = "https://github.com/benthecarman/cdk.git", rev = "62ac47d51d6c74c7b847ae0c19e7c84899efe872", optional = true }
38+
cdk-axum = { git = "https://github.com/benthecarman/cdk.git", rev = "62ac47d51d6c74c7b847ae0c19e7c84899efe872", optional = true }
3939
axum = { version = "0.8.1", optional = true }
4040

4141
uniffi = { version = "0.29", features = ["cli", "tokio"], optional = true }

orange-sdk/src/runtime.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// accordance with one or both of these licenses.
77

88
use ldk_node::lightning::util::logger::Logger as _;
9-
use ldk_node::lightning::{log_debug, log_error, log_trace};
9+
use ldk_node::lightning::{log_debug, log_error, log_trace, log_warn};
1010
use std::future::Future;
1111
use std::sync::{Arc, Mutex};
1212
use std::time::Duration;
@@ -95,14 +95,20 @@ impl Runtime {
9595

9696
pub fn abort_cancellable_background_tasks(&self) {
9797
let mut tasks = core::mem::take(&mut *self.cancellable_background_tasks.lock().unwrap());
98-
debug_assert!(!tasks.is_empty(), "Expected some cancellable background_tasks");
98+
if tasks.is_empty() {
99+
log_warn!(self.logger, "Stopping cancellable background tasks with no tasks");
100+
return;
101+
}
99102
tasks.abort_all();
100103
self.block_on(async { while tasks.join_next().await.is_some() {} })
101104
}
102105

103106
pub fn wait_on_background_tasks(&self) {
104107
let mut tasks = core::mem::take(&mut *self.background_tasks.lock().unwrap());
105-
debug_assert!(!tasks.is_empty(), "Expected some background_tasks");
108+
if tasks.is_empty() {
109+
log_warn!(self.logger, "Stopping background tasks with no tasks");
110+
return;
111+
}
106112
self.block_on(async {
107113
loop {
108114
let timeout_fut = tokio::time::timeout(

0 commit comments

Comments
 (0)