From fdb40569577b305ca7d9c44fbcd1cc86d7ed53d8 Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Thu, 25 Jan 2024 14:35:31 -0600 Subject: [PATCH] Fix expected lsp amount when amount is 1 --- mutiny-core/src/node.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mutiny-core/src/node.rs b/mutiny-core/src/node.rs index d966d3536..1b67a6c67 100644 --- a/mutiny-core/src/node.rs +++ b/mutiny-core/src/node.rs @@ -1061,11 +1061,12 @@ impl Node { 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 );