Commit Graph
18 Commits
Author SHA1 Message Date
Wilmer Paulino c09cbdc284 zpay32: add encode/decode tests for invoices with zero amount 2018-01-27 19:05:25 -05:00
Wilmer Paulino af16654c0c rpcserver: allow payment of invoices with zero amount 2018-01-27 19:05:24 -05:00
Wilmer Paulino 454eab720e lncli: optionally include the amount in the payment request 2018-01-27 19:05:24 -05:00
Wilmer Paulino f0d6d31ca4 htlcswitch: allow sending htlcs when paying invoices with a zero amount 2018-01-27 19:05:23 -05:00
Wilmer Paulino 1570c0ece8 rpcserver: allow creation of invoices with zero amount 2018-01-27 19:05:22 -05:00
Wilmer Paulino 78b9dc4b96 lncli: remove requirement for invoice value argument 2018-01-27 19:05:21 -05:00
Wilmer Paulino 8ed52dcf64 lnrpc: avoid lookupinvoice endpoint collision
This commit changes the listinvoices and lookupinvoice endpoints to
avoid collisions when making requests.

We can still retrieve a list of pending invoices with `listinvoices` by
appending the parameter `pending_only=true` to the request URL.
2018-01-26 01:08:12 -05:00
Wilmer Paulino cfb19b8d51 invoice: avoid negative msat amounts 2018-01-23 14:38:20 -05:00
Wilmer Paulino 8807fb804b invoice: add unit tests for each parsed tagged field
This commit introduces unit tests for each parsed tagged field to cover
all possible input scenarios.
2018-01-19 12:00:51 -05:00
Wilmer Paulino 07ac278771 invoice: properly parse the field data length
When accessing a value from a byte slice, the value is returned as a
byte, which is just a uint8. When the first byte takes more than 3 bits
of space, shifting 5 bits left results in data loss.
2018-01-19 10:52:24 -05:00
Wilmer Paulino fa2cc57ca6 invoice: sanity check routing info field
This commit allows parseRoutingInfo to return an error when parsing a
routing info field whose length is not a multiple of 51 bytes, rather
than crash.
2018-01-19 10:52:23 -05:00
Wilmer Paulino db7154a401 invoice: sanity check empty fallback addr field
This commit allows parseFallbackAddr to return an error when parsing an
empty fallback address field, rather than crash.
2018-01-19 10:52:22 -05:00
Wilmer Paulino 00d530bd91 invoice: remove duplicate code when parsing the timestamp 2018-01-19 10:52:21 -05:00
Wilmer Paulino 6f5d673679 invoice: refactor parsing tagged fields
This commit refactors parsing each of the tagged fields of an invoice
into their own method. This makes the code easier to read and will allow
us to introduce unit tests for each parsing method.
2018-01-19 10:52:21 -05:00
Wilmer Paulino f4a649b30a rpcserver: add uris to getinfo response 2018-01-07 13:26:18 -05:00
Wilmer Paulino e2af9a6897 docs: clarify how to generate protobuf definitions 2018-01-07 01:54:28 -05:00
Wilmer Paulino a61b6428e8 lnrpc: add protof definitions for uris to getinfo 2018-01-07 00:50:30 -05:00
Wilmer Paulino 445e11db5c bolt11: handle r field fee spec change
Updates the way fees are handled for routing payments.
See lightningnetwork/lightning-rfc#317.
2018-01-04 13:23:56 +01:00