Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ default = []
# lightning-macros = { version = "0.2.0" }

# Branch: https://github.com/moneydevkit/rust-lightning/commits/lsp-0.2.0/
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0", features = ["std"] }
lightning-types = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0" }
lightning-invoice = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0", features = ["std"] }
lightning-net-tokio = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0" }
lightning-persister = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0", features = ["tokio"] }
lightning-background-processor = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0" }
lightning-rapid-gossip-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0" }
lightning-block-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0", features = ["rest-client", "rpc-client", "tokio"] }
lightning-transaction-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
lightning-liquidity = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0", features = ["std"] }
lightning-macros = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0" }
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121", features = ["std"] }
lightning-types = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121" }
lightning-invoice = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121", features = ["std"] }
lightning-net-tokio = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121" }
lightning-persister = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121", features = ["tokio"] }
lightning-background-processor = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121" }
lightning-rapid-gossip-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121" }
lightning-block-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121", features = ["rest-client", "rpc-client", "tokio"] }
lightning-transaction-sync = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
lightning-liquidity = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121", features = ["std"] }
lightning-macros = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121" }

#lightning = { path = "../rust-lightning/lightning", features = ["std"] }
#lightning-types = { path = "../rust-lightning/lightning-types" }
Expand Down Expand Up @@ -101,7 +101,7 @@ winapi = { version = "0.3", features = ["winbase"] }
[dev-dependencies]
# lightning = { version = "0.2.0", features = ["std", "_test_utils"] }
# Branch: https://github.com/moneydevkit/rust-lightning/commits/lsp-0.2.0/
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "55f7619f235a05297e81607c2f652d87ed896ce0", features = ["std", "_test_utils"] }
lightning = { git = "https://github.com/moneydevkit/rust-lightning", rev = "b89fc7121", features = ["std", "_test_utils"] }
#lightning = { path = "../rust-lightning/lightning", features = ["std", "_test_utils"] }
proptest = "1.0.0"
regex = "1.5.6"
Expand Down
1 change: 1 addition & 0 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1750,6 +1750,7 @@ fn build_with_store_internal(
Arc::clone(&keys_manager),
Arc::clone(&chain_source),
Arc::clone(&tx_broadcaster),
Arc::clone(&fee_estimator),
Arc::clone(&kv_store),
Arc::clone(&config),
Arc::clone(&logger),
Expand Down
12 changes: 12 additions & 0 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1506,6 +1506,13 @@ where
} => {
log_info!(self.logger, "Channel {} closed due to: {}", channel_id, reason);

// Clear LSPS4 liquidity cooldown so the timer can retry.
if let Some(ref counterparty) = counterparty_node_id {
if let Some(liquidity_source) = self.liquidity_source.as_ref() {
liquidity_source.handle_channel_closed(counterparty).await;
}
}

let event = Event::ChannelClosed {
channel_id,
user_channel_id: UserChannelId(user_channel_id),
Expand Down Expand Up @@ -1782,6 +1789,11 @@ where
return Err(ReplayEvent());
}

// Reset LSPS4 cooldown so the timer can retry after cooldown period.
if let Some(liquidity_source) = self.liquidity_source.as_ref() {
liquidity_source.handle_splice_failed(&counterparty_node_id).await;
}

let event = Event::SpliceFailed {
channel_id,
user_channel_id: UserChannelId(user_channel_id),
Expand Down
Loading
Loading