Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Fix expected lsp amount when amount is 1 #991

Merged
merged 1 commit into from
Jan 25, 2024
Merged
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
5 changes: 3 additions & 2 deletions mutiny-core/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1061,11 +1061,12 @@ impl<S: MutinyStorage> Node<S> {

if lsp_invoice.payment_hash() != invoice.payment_hash()
|| lsp_invoice.recover_payee_pub_key() != client.get_lsp_pubkey()
|| lsp_invoice.amount_milli_satoshis() != Some(amount_sat * 1_000)
|| (lsp_invoice.amount_milli_satoshis() != Some(amount_sat * 1_000)
&& amount_sat != amount_minus_fee)
{
log_error!(
self.logger,
"Received unexpected invoice from LSP: {:?} != {}",
"Received unexpected invoice from LSP: {:?} when amount was {}",
lsp_invoice.amount_milli_satoshis(),
amount_sat * 1_000
);
Expand Down
Loading