mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-01-06 02:14:21 +01:00
Issue NUT-08 overpaid Lightning fees for melt quote checks on startup (#688)
* startup: do not rollback unknown melt quote states * fix: provide overpaid fees on startup * fix: check if outputs in db * fix test: expect melt quote pending if payment state is unknown * fix up comment
This commit is contained in:
@@ -86,9 +86,9 @@ class WalletTransactions(SupportsDb, SupportsKeysets):
|
||||
remainder = amount_to_send
|
||||
selected_proofs = [smaller_proofs[0]]
|
||||
fee_ppk = self.get_fees_for_proofs_ppk(selected_proofs) if include_fees else 0
|
||||
logger.debug(f"adding proof: {smaller_proofs[0].amount} – fee: {fee_ppk} ppk")
|
||||
logger.trace(f"adding proof: {smaller_proofs[0].amount} – fee: {fee_ppk} ppk")
|
||||
remainder -= smaller_proofs[0].amount - fee_ppk / 1000
|
||||
logger.debug(f"remainder: {remainder}")
|
||||
logger.trace(f"remainder: {remainder}")
|
||||
if remainder > 0:
|
||||
logger.trace(
|
||||
f"> selecting more proofs from {amount_summary(smaller_proofs[1:], self.unit)} sum: {sum_proofs(smaller_proofs[1:])} to reach {remainder}"
|
||||
|
||||
Reference in New Issue
Block a user