Skip to content

Commit 916e0ef

Browse files
committed
Bump LDK to 2.0.0-rc1
We bump the LDK depedencies to the just-released 2.0 release candidate and account for minor last-minute API changes.
1 parent 1a134b4 commit 916e0ef

File tree

6 files changed

+39
-28
lines changed

6 files changed

+39
-28
lines changed

Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ panic = 'abort' # Abort on panic
2929
default = []
3030

3131
[dependencies]
32-
lightning = { version = "0.2.0-beta1", features = ["std"] }
33-
lightning-types = { version = "0.3.0-beta1" }
34-
lightning-invoice = { version = "0.34.0-beta1", features = ["std"] }
35-
lightning-net-tokio = { version = "0.2.0-beta1" }
36-
lightning-persister = { version = "0.2.0-beta1", features = ["tokio"] }
37-
lightning-background-processor = { version = "0.2.0-beta1" }
38-
lightning-rapid-gossip-sync = { version = "0.2.0-beta1" }
39-
lightning-block-sync = { version = "0.2.0-beta1", features = ["rest-client", "rpc-client", "tokio"] }
40-
lightning-transaction-sync = { version = "0.2.0-beta1", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
41-
lightning-liquidity = { version = "0.2.0-beta1", features = ["std"] }
42-
lightning-macros = { version = "0.2.0-beta1" }
32+
lightning = { version = "0.2.0-rc1", features = ["std"] }
33+
lightning-types = { version = "0.3.0-rc1" }
34+
lightning-invoice = { version = "0.34.0-rc1", features = ["std"] }
35+
lightning-net-tokio = { version = "0.2.0-rc1" }
36+
lightning-persister = { version = "0.2.0-rc1", features = ["tokio"] }
37+
lightning-background-processor = { version = "0.2.0-rc1" }
38+
lightning-rapid-gossip-sync = { version = "0.2.0-rc1" }
39+
lightning-block-sync = { version = "0.2.0-rc1", features = ["rest-client", "rpc-client", "tokio"] }
40+
lightning-transaction-sync = { version = "0.2.0-rc1", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
41+
lightning-liquidity = { version = "0.2.0-rc1", features = ["std"] }
42+
lightning-macros = { version = "0.2.0-rc1" }
4343

4444
#lightning = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "main", features = ["std"] }
4545
#lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "main" }
@@ -108,7 +108,7 @@ prost = { version = "0.11.6", default-features = false}
108108
winapi = { version = "0.3", features = ["winbase"] }
109109

110110
[dev-dependencies]
111-
lightning = { version = "0.2.0-beta1", features = ["std", "_test_utils"] }
111+
lightning = { version = "0.2.0-rc1", features = ["std", "_test_utils"] }
112112
#lightning = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main", features = ["std", "_test_utils"] }
113113
#lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "21e9a9c0ef80021d0669f2a366f55d08ba8d9b03", features = ["std", "_test_utils"] }
114114
#lightning = { path = "../rust-lightning/lightning", features = ["std", "_test_utils"] }

src/data_store.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ where
103103
&self.primary_namespace,
104104
&self.secondary_namespace,
105105
&store_key,
106+
false,
106107
)
107108
.map_err(|e| {
108109
log_error!(

src/io/sqlite_store/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl KVStore for SqliteStore {
137137
}
138138

139139
fn remove(
140-
&self, primary_namespace: &str, secondary_namespace: &str, key: &str,
140+
&self, primary_namespace: &str, secondary_namespace: &str, key: &str, _lazy: bool,
141141
) -> Pin<Box<dyn Future<Output = Result<(), io::Error>> + Send>> {
142142
let locking_key = self.build_locking_key(primary_namespace, secondary_namespace, key);
143143
let (inner_lock_ref, version) = self.get_new_version_and_lock_ref(locking_key.clone());
@@ -205,7 +205,7 @@ impl KVStoreSync for SqliteStore {
205205
}
206206

207207
fn remove(
208-
&self, primary_namespace: &str, secondary_namespace: &str, key: &str,
208+
&self, primary_namespace: &str, secondary_namespace: &str, key: &str, _lazy: bool,
209209
) -> io::Result<()> {
210210
let locking_key = self.build_locking_key(primary_namespace, secondary_namespace, key);
211211
let (inner_lock_ref, version) = self.get_new_version_and_lock_ref(locking_key.clone());

src/io/test_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub(crate) fn do_read_write_remove_list_persist<K: KVStoreSync + RefUnwindSafe>(
6868
let read_data = kv_store.read(primary_namespace, secondary_namespace, key).unwrap();
6969
assert_eq!(data, &*read_data);
7070

71-
kv_store.remove(primary_namespace, secondary_namespace, key).unwrap();
71+
kv_store.remove(primary_namespace, secondary_namespace, key, false).unwrap();
7272

7373
let listed_keys = kv_store.list(primary_namespace, secondary_namespace).unwrap();
7474
assert_eq!(listed_keys.len(), 0);
@@ -84,7 +84,7 @@ pub(crate) fn do_read_write_remove_list_persist<K: KVStoreSync + RefUnwindSafe>(
8484
let read_data = kv_store.read(&max_chars, &max_chars, &max_chars).unwrap();
8585
assert_eq!(data, &*read_data);
8686

87-
kv_store.remove(&max_chars, &max_chars, &max_chars).unwrap();
87+
kv_store.remove(&max_chars, &max_chars, &max_chars, false).unwrap();
8888

8989
let listed_keys = kv_store.list(&max_chars, &max_chars).unwrap();
9090
assert_eq!(listed_keys.len(), 0);

src/io/vss_store.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl KVStoreSync for VssStore {
181181
}
182182

183183
fn remove(
184-
&self, primary_namespace: &str, secondary_namespace: &str, key: &str,
184+
&self, primary_namespace: &str, secondary_namespace: &str, key: &str, _lazy: bool,
185185
) -> io::Result<()> {
186186
let internal_runtime = self.internal_runtime.as_ref().ok_or_else(|| {
187187
debug_assert!(false, "Failed to access internal runtime");
@@ -275,7 +275,7 @@ impl KVStore for VssStore {
275275
})
276276
}
277277
fn remove(
278-
&self, primary_namespace: &str, secondary_namespace: &str, key: &str,
278+
&self, primary_namespace: &str, secondary_namespace: &str, key: &str, _lazy: bool,
279279
) -> Pin<Box<dyn Future<Output = Result<(), io::Error>> + Send>> {
280280
let locking_key = self.build_locking_key(primary_namespace, secondary_namespace, key);
281281
let (inner_lock_ref, version) = self.get_new_version_and_lock_ref(locking_key.clone());

tests/common/mod.rs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,14 +1244,14 @@ impl KVStore for TestSyncStore {
12441244
})
12451245
}
12461246
fn remove(
1247-
&self, primary_namespace: &str, secondary_namespace: &str, key: &str,
1247+
&self, primary_namespace: &str, secondary_namespace: &str, key: &str, lazy: bool,
12481248
) -> Pin<Box<dyn Future<Output = Result<(), io::Error>> + Send>> {
12491249
let primary_namespace = primary_namespace.to_string();
12501250
let secondary_namespace = secondary_namespace.to_string();
12511251
let key = key.to_string();
12521252
let inner = Arc::clone(&self.inner);
12531253
let fut = tokio::task::spawn_blocking(move || {
1254-
inner.remove_internal(&primary_namespace, &secondary_namespace, &key)
1254+
inner.remove_internal(&primary_namespace, &secondary_namespace, &key, lazy)
12551255
});
12561256
Box::pin(async move {
12571257
fut.await.unwrap_or_else(|e| {
@@ -1292,9 +1292,9 @@ impl KVStoreSync for TestSyncStore {
12921292
}
12931293

12941294
fn remove(
1295-
&self, primary_namespace: &str, secondary_namespace: &str, key: &str,
1295+
&self, primary_namespace: &str, secondary_namespace: &str, key: &str, lazy: bool,
12961296
) -> lightning::io::Result<()> {
1297-
self.inner.remove_internal(primary_namespace, secondary_namespace, key)
1297+
self.inner.remove_internal(primary_namespace, secondary_namespace, key, lazy)
12981298
}
12991299

13001300
fn list(
@@ -1432,15 +1432,25 @@ impl TestSyncStoreInner {
14321432
}
14331433

14341434
fn remove_internal(
1435-
&self, primary_namespace: &str, secondary_namespace: &str, key: &str,
1435+
&self, primary_namespace: &str, secondary_namespace: &str, key: &str, lazy: bool,
14361436
) -> lightning::io::Result<()> {
14371437
let _guard = self.serializer.write().unwrap();
14381438
let fs_res =
1439-
KVStoreSync::remove(&self.fs_store, primary_namespace, secondary_namespace, key);
1440-
let sqlite_res =
1441-
KVStoreSync::remove(&self.sqlite_store, primary_namespace, secondary_namespace, key);
1442-
let test_res =
1443-
KVStoreSync::remove(&self.test_store, primary_namespace, secondary_namespace, key);
1439+
KVStoreSync::remove(&self.fs_store, primary_namespace, secondary_namespace, key, lazy);
1440+
let sqlite_res = KVStoreSync::remove(
1441+
&self.sqlite_store,
1442+
primary_namespace,
1443+
secondary_namespace,
1444+
key,
1445+
lazy,
1446+
);
1447+
let test_res = KVStoreSync::remove(
1448+
&self.test_store,
1449+
primary_namespace,
1450+
secondary_namespace,
1451+
key,
1452+
lazy,
1453+
);
14441454

14451455
assert!(!self
14461456
.do_list(primary_namespace, secondary_namespace)

0 commit comments

Comments
 (0)