Skip to content

Commit

Permalink
Fix expected lsp amount when amount is 1
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyGiorgio committed Jan 25, 2024
1 parent 4c54bf2 commit fdb4056
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit fdb4056

Please sign in to comment.