Uh oh!
There was an error while loading. Please reload this page.
Add support for liquidity mgmt. via lightning-liquidity - #223
Conversation
e8cfd19 to
e12d8d4Compare43d5f5f to
a626584CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
6644bd0 to
ba1fd79Compareba1fd79 to
8db5970Compare5d597be to
753be94CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| if let Some(lsps2_service) = self.lsps2_service.as_ref() { | ||
| if counterparty_node_id != lsps2_service.node_id { | ||
| debug_assert!( | ||
| false, | ||
| "Received response from unexpected LSP counterparty. This should never happen." | ||
| ); | ||
| log_error!( | ||
| self.logger, | ||
| "Received response from unexpected LSP counterparty. This should never happen." | ||
| ); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Gotcha. Shuffling things around and doing a pre-match might help eliminated some duplication (haven't actually tried this):
match event {Event::LSPS2Client(client_event) => matchself.lsps2_service.as_ref(){Some(lsps2_service) => {match&client_event {LSPS2ClientEvent::OpeningParametersReady{ counterparty_node_id, .. }
| LSPS2ClientEvent::InvoiceParametersReady{ counterparty_node_id, .. } => {/* */},};match client_event {LSPS2ClientEvent::OpeningParametersReady{/* */ .. } => {/* */},LSPS2ClientEvent::InvoiceParametersReady{/* */ .. } => {/* */},};},None => {/* */},}};Uh oh!
There was an error while loading. Please reload this page.
753be94 to
6beb61cCompare
jkczyz
left a comment
There was a problem hiding this comment.
Code looks good. What's the testing strategy?
| if let Some(lsps2_service) = self.lsps2_service.as_ref() { | ||
| if counterparty_node_id != lsps2_service.node_id { | ||
| debug_assert!( | ||
| false, | ||
| "Received response from unexpected LSP counterparty. This should never happen." | ||
| ); | ||
| log_error!( | ||
| self.logger, | ||
| "Received response from unexpected LSP counterparty. This should never happen." | ||
| ); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Even if you prefer repeating the counterparty_id check, it seems better to check lsps2_servicebefore matching any LSPS2ClientEvent. But will defer to your preference. I could see indentation getting out of hand.
tnull
commented
Feb 6, 2024
For now we can only test manually against Testnet/Regtest/Signet nodes (actually, running on Mutinynet). We will also looking to add more testing utils to the |
tnull
commented
Feb 12, 2024
@jkczyz Let me know when I can squash the fixups. |
jkczyz
commented
Feb 12, 2024
Sure, feel free to squash. |
6beb61c to
e37398eComparetnull
commented
Feb 13, 2024
Squashed fixups without further changes. |
e37398e to
ffdf5c0Comparetnull
commented
Feb 15, 2024
Rebased on main to fix CI and also updated to use the just-released Notably, the |
ffdf5c0 to
3248f0dCompare3248f0d to
f011f10Comparetnull
commented
Feb 16, 2024
Squashed without further changes. |
... which is nice for consistency reasons. We also fix a minor bug that would have lead us to forget a peer whenever we'd close a channel, even if it wasn't the last one.
... which is nice for consistency reasons.
We add a `LiquiditySource` object that is configurable via builder methods, currently allowing to source inbound liquidity from an LSPS2 service. In the next commit(s) we'll add corresponding API and event handling.
f011f10 to
3c05b17Comparetnull
commented
Feb 19, 2024
Rebased on |
yanganto
commented
Feb 20, 2024
Hi @tnull |
Closes#194
We add initial, alpha-stage support for liquidity-management via LSPS2/
lightning-liquidity.Draft as still work in progress (and blocked on lightningdevkit/lightning-liquidity#73 / lightningdevkit/lightning-liquidity#74).