Skip to content

Commit fdbbb61

Browse files
author
Fernando Ledesma
committed
add payment hash to send webhook event
1 parent 13eece7 commit fdbbb61

3 files changed

Lines changed: 17 additions & 14 deletions

File tree

Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ default = []
4242
# lightning-macros = { version = "0.2.0" }
4343

4444
# Branch: https://github.com/moneydevkit/rust-lightning/commits/lsp-0.2.0/
45-
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["std"] }
46-
lightning-types = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a" }
47-
lightning-invoice = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["std"] }
48-
lightning-net-tokio = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a" }
49-
lightning-persister = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["tokio"] }
50-
lightning-background-processor = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a" }
51-
lightning-rapid-gossip-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a" }
52-
lightning-block-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["rest-client", "rpc-client", "tokio"] }
53-
lightning-transaction-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
54-
lightning-liquidity = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["std"] }
55-
lightning-macros = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a" }
45+
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f", features = ["std"] }
46+
lightning-types = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f" }
47+
lightning-invoice = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f", features = ["std"] }
48+
lightning-net-tokio = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f" }
49+
lightning-persister = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f", features = ["tokio"] }
50+
lightning-background-processor = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f" }
51+
lightning-rapid-gossip-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f" }
52+
lightning-block-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f", features = ["rest-client", "rpc-client", "tokio"] }
53+
lightning-transaction-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
54+
lightning-liquidity = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f", features = ["std"] }
55+
lightning-macros = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f" }
5656

5757
#lightning = { path = "../rust-lightning/lightning", features = ["std"] }
5858
#lightning-types = { path = "../rust-lightning/lightning-types" }
@@ -101,7 +101,7 @@ winapi = { version = "0.3", features = ["winbase"] }
101101
[dev-dependencies]
102102
# lightning = { version = "0.2.0", features = ["std", "_test_utils"] }
103103
# Branch: https://github.com/moneydevkit/rust-lightning/commits/lsp-0.2.0/
104-
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "736d3a87bf8f7220a2b2e2e0274bce94d1ae0e2a", features = ["std", "_test_utils"] }
104+
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "68c0e4dee543058578246ec18b084a13f7cae84f", features = ["std", "_test_utils"] }
105105
#lightning = { path = "../rust-lightning/lightning", features = ["std", "_test_utils"] }
106106
proptest = "1.0.0"
107107
regex = "1.5.6"

src/event.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ pub enum Event {
238238
SendWebhook {
239239
/// The node id of the node that needs to be notified.
240240
node_id: PublicKey,
241+
/// The payment hash
242+
payment_hash: PaymentHash
241243
},
242244
/// A channel splice is pending confirmation on-chain.
243245
SplicePending {
@@ -321,6 +323,7 @@ impl_writeable_tlv_based_enum!(Event,
321323
},
322324
(8, SendWebhook) => {
323325
(0, node_id, required),
326+
(1, payment_hash, required),
324327
},
325328
(9, SplicePending) => {
326329
(1, channel_id, required),

src/liquidity.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,10 +1202,10 @@ where
12021202
},
12031203
}
12041204
},
1205-
LiquidityEvent::LSPS4Service(LSPS4ServiceEvent::SendWebhook { counterparty_node_id }) => {
1205+
LiquidityEvent::LSPS4Service(LSPS4ServiceEvent::SendWebhook { counterparty_node_id, payment_hash }) => {
12061206
if let Err(e) = self
12071207
.event_queue
1208-
.add_event(crate::event::Event::SendWebhook { node_id: counterparty_node_id }).await
1208+
.add_event(crate::event::Event::SendWebhook { node_id: counterparty_node_id, payment_hash }).await
12091209
{
12101210
log_error!(self.logger, "Failed to queue webhook event: {:?}", e);
12111211
}

0 commit comments

Comments
 (0)