Skip to content

Conversation

@bitwalt
Copy link
Contributor

@bitwalt bitwalt commented Jan 16, 2026

  • Add test case for zero-amount invoice payment in payment module
  • Fix panic in send_payment function when handling zero-amount invoices
  • Remove redundant unwrap() that was shadowing properly-calculated amt_msat
  • Zero-amount invoices now properly accept explicit payment amounts
  • Format code with cargo fmt

Fixes #88

Copy link
Member

@zoedberg zoedberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding and fixing this.

Please make the following changes:

  • split the commit in 2, one with just the test and the second one with the fix. This allows to see the test successfully reproduces the bug
  • to avoid very long commit names put an empty line between the short and long description otherwise the git CLI will treat everything as a short description
  • the test is using the same directory of the zero_amount_invoice test, so one test will override the data of the other. I think that instead of adding a new test you can just add the payment part to the already existing test

@bitwalt bitwalt force-pushed the zero-amount-ln-invoices branch from acd0b1d to 6eddda0 Compare January 16, 2026 15:05
@bitwalt bitwalt force-pushed the zero-amount-ln-invoices branch from 6eddda0 to c782095 Compare January 16, 2026 15:46
@bitwalt
Copy link
Contributor Author

bitwalt commented Jan 16, 2026

Should be done! Let me know if there's something else to change

@zoedberg zoedberg merged commit 1a873f7 into RGB-Tools:master Jan 16, 2026
12 checks passed
@zoedberg
Copy link
Member

LGTM, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zero-amount Lightning invoice payments crash

2 participants