Skip to content

Commit ef789f4

Browse files
authored
Merge pull request #4193 from TheBlueMatt/2025-10-0.2-backports-2
0.2-rc1 backports
2 parents 1b4d8e4 + a107ca2 commit ef789f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+635
-222
lines changed

CHANGELOG.md

Lines changed: 409 additions & 0 deletions
Large diffs are not rendered by default.

fuzz/src/fs_store.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ async fn do_test_internal<Out: test_logger::Output>(data: &[u8], _out: Out) {
7878
Some(b) => b[0],
7979
None => break,
8080
};
81-
match v % 12 {
81+
match v % 13 {
8282
// Sync write
8383
0 => {
8484
let data_value = get_next_data_value();
@@ -96,7 +96,8 @@ async fn do_test_internal<Out: test_logger::Output>(data: &[u8], _out: Out) {
9696
},
9797
// Sync remove
9898
1 => {
99-
KVStoreSync::remove(fs_store, primary_namespace, secondary_namespace, key).unwrap();
99+
KVStoreSync::remove(fs_store, primary_namespace, secondary_namespace, key, false)
100+
.unwrap();
100101

101102
current_data = None;
102103
},
@@ -130,8 +131,10 @@ async fn do_test_internal<Out: test_logger::Output>(data: &[u8], _out: Out) {
130131
handles.push(handle);
131132
},
132133
// Async remove
133-
10 => {
134-
let fut = KVStore::remove(fs_store, primary_namespace, secondary_namespace, key);
134+
10 | 11 => {
135+
let lazy = v == 10;
136+
let fut =
137+
KVStore::remove(fs_store, primary_namespace, secondary_namespace, key, lazy);
135138

136139
// Already set the current_data, even though writing hasn't finished yet. This supports the call-time
137140
// ordering semantics.
@@ -141,7 +144,7 @@ async fn do_test_internal<Out: test_logger::Output>(data: &[u8], _out: Out) {
141144
handles.push(handle);
142145
},
143146
// Join tasks.
144-
11 => {
147+
12 => {
145148
for handle in handles.drain(..) {
146149
let _ = handle.await.unwrap();
147150
}

lightning-background-processor/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.2.0-beta1"
44
authors = ["Valentine Wallace <[email protected]>"]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/lightningdevkit/rust-lightning"
7+
readme = "../README.md"
78
description = """
89
Utilities to perform required background tasks for Rust Lightning.
910
"""

lightning-background-processor/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,14 +748,14 @@ use futures_util::{dummy_waker, Joiner, OptionalSelector, Selector, SelectorOutp
748748
/// # impl lightning::util::persist::KVStoreSync for StoreSync {
749749
/// # fn read(&self, primary_namespace: &str, secondary_namespace: &str, key: &str) -> io::Result<Vec<u8>> { Ok(Vec::new()) }
750750
/// # fn write(&self, primary_namespace: &str, secondary_namespace: &str, key: &str, buf: Vec<u8>) -> io::Result<()> { Ok(()) }
751-
/// # fn remove(&self, primary_namespace: &str, secondary_namespace: &str, key: &str) -> io::Result<()> { Ok(()) }
751+
/// # fn remove(&self, primary_namespace: &str, secondary_namespace: &str, key: &str, lazy: bool) -> io::Result<()> { Ok(()) }
752752
/// # fn list(&self, primary_namespace: &str, secondary_namespace: &str) -> io::Result<Vec<String>> { Ok(Vec::new()) }
753753
/// # }
754754
/// # struct Store {}
755755
/// # impl lightning::util::persist::KVStore for Store {
756756
/// # fn read(&self, primary_namespace: &str, secondary_namespace: &str, key: &str) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, io::Error>> + 'static + Send>> { todo!() }
757757
/// # fn write(&self, primary_namespace: &str, secondary_namespace: &str, key: &str, buf: Vec<u8>) -> Pin<Box<dyn Future<Output = Result<(), io::Error>> + 'static + Send>> { todo!() }
758-
/// # fn remove(&self, primary_namespace: &str, secondary_namespace: &str, key: &str) -> Pin<Box<dyn Future<Output = Result<(), io::Error>> + 'static + Send>> { todo!() }
758+
/// # fn remove(&self, primary_namespace: &str, secondary_namespace: &str, key: &str, lazy: bool) -> Pin<Box<dyn Future<Output = Result<(), io::Error>> + 'static + Send>> { todo!() }
759759
/// # fn list(&self, primary_namespace: &str, secondary_namespace: &str) -> Pin<Box<dyn Future<Output = Result<Vec<String>, io::Error>> + 'static + Send>> { todo!() }
760760
/// # }
761761
/// # use core::time::Duration;
@@ -2144,9 +2144,9 @@ mod tests {
21442144
}
21452145

21462146
fn remove(
2147-
&self, primary_namespace: &str, secondary_namespace: &str, key: &str,
2147+
&self, primary_namespace: &str, secondary_namespace: &str, key: &str, lazy: bool,
21482148
) -> lightning::io::Result<()> {
2149-
self.kv_store.remove(primary_namespace, secondary_namespace, key)
2149+
self.kv_store.remove(primary_namespace, secondary_namespace, key, lazy)
21502150
}
21512151

21522152
fn list(

lightning-block-sync/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.2.0-beta1"
44
authors = ["Jeffrey Czyz", "Matt Corallo"]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/lightningdevkit/rust-lightning"
7+
readme = "../README.md"
78
description = """
89
Utilities to fetch the chain data from a block source and feed them into Rust Lightning.
910
"""

lightning-custom-message/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.2.0-beta1"
44
authors = ["Jeffrey Czyz"]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/lightningdevkit/rust-lightning"
7+
readme = "../README.md"
78
description = """
89
Utilities for supporting custom peer-to-peer messages in LDK.
910
"""

lightning-dns-resolver/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.3.0-beta1"
44
authors = ["Matt Corallo"]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/lightningdevkit/rust-lightning/"
7+
readme = "../README.md"
78
description = "A crate which implements DNSSEC resolution for lightning clients over bLIP 32 using `tokio` and the `dnssec-prover` crate."
89
edition = "2021"
910

lightning-liquidity/src/lsps2/service.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,6 +1834,7 @@ where
18341834
LIQUIDITY_MANAGER_PERSISTENCE_PRIMARY_NAMESPACE,
18351835
LSPS2_SERVICE_PERSISTENCE_SECONDARY_NAMESPACE,
18361836
&key,
1837+
true,
18371838
));
18381839
} else {
18391840
// If the peer got new state, force a re-persist of the current state.

lightning-liquidity/src/lsps5/event.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use alloc::vec::Vec;
1515
use bitcoin::secp256k1::PublicKey;
1616

1717
use lightning::impl_writeable_tlv_based_enum;
18-
use lightning::util::hash_tables::HashMap;
1918

2019
use super::msgs::LSPS5AppName;
2120
use super::msgs::LSPS5Error;
@@ -70,7 +69,7 @@ pub enum LSPS5ServiceEvent {
7069
/// - `"x-lsps5-timestamp"`: with the timestamp in RFC3339 format (`"YYYY-MM-DDThh:mm:ss.uuuZ"`).
7170
/// - `"x-lsps5-signature"`: with the signature of the notification payload, signed using the LSP's node ID.
7271
/// Other custom headers may also be included as needed.
73-
headers: HashMap<String, String>,
72+
headers: Vec<(String, String)>,
7473
},
7574
}
7675

lightning-liquidity/src/lsps5/msgs.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -541,34 +541,29 @@ pub struct WebhookNotification {
541541
}
542542

543543
impl WebhookNotification {
544-
/// Create a new webhook notification.
545-
pub fn new(method: WebhookNotificationMethod) -> Self {
546-
Self { method }
547-
}
548-
549544
/// Create a webhook_registered notification.
550545
pub fn webhook_registered() -> Self {
551-
Self::new(WebhookNotificationMethod::LSPS5WebhookRegistered)
546+
Self { method: WebhookNotificationMethod::LSPS5WebhookRegistered }
552547
}
553548

554549
/// Create a payment_incoming notification.
555550
pub fn payment_incoming() -> Self {
556-
Self::new(WebhookNotificationMethod::LSPS5PaymentIncoming)
551+
Self { method: WebhookNotificationMethod::LSPS5PaymentIncoming }
557552
}
558553

559554
/// Create an expiry_soon notification.
560555
pub fn expiry_soon(timeout: u32) -> Self {
561-
Self::new(WebhookNotificationMethod::LSPS5ExpirySoon { timeout })
556+
Self { method: WebhookNotificationMethod::LSPS5ExpirySoon { timeout } }
562557
}
563558

564559
/// Create a liquidity_management_request notification.
565560
pub fn liquidity_management_request() -> Self {
566-
Self::new(WebhookNotificationMethod::LSPS5LiquidityManagementRequest)
561+
Self { method: WebhookNotificationMethod::LSPS5LiquidityManagementRequest }
567562
}
568563

569564
/// Create an onion_message_incoming notification.
570565
pub fn onion_message_incoming() -> Self {
571-
Self::new(WebhookNotificationMethod::LSPS5OnionMessageIncoming)
566+
Self { method: WebhookNotificationMethod::LSPS5OnionMessageIncoming }
572567
}
573568
}
574569

0 commit comments

Comments
 (0)