Commit Graph

9 Commits

Author SHA1 Message Date
Daniel McNally
6e5477e378 zpay32 test: litecoin decode tests
New tests are added for creating, decoding, and re-encoding
litecoin invoices for both mainnet and testnet, as well as a test
that expects an error when the active network mismatches the
invoice.
2018-02-19 10:19:24 -05:00
Nalin Bhardwaj
00dacc7bb5
zpay32: Add test for non-ASCII(UTF-8) descriptions 2018-02-10 04:24:53 +05:30
Valentine Wallace
3b4ffbca48 zpay32: add 2 tests for invalid invoice fields
Test for empty fallback address field, and separately test for invalid
routing info length (not a multiple of 51).
2018-01-27 18:45:57 -08:00
Wilmer Paulino
c09cbdc284
zpay32: add encode/decode tests for invoices with zero amount 2018-01-27 19:05:25 -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
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
Olaoluwa Osuntokun
c54e6fc803
zpay32: add new 'c' field to payreqs for specifying final cltv delta 2017-10-22 18:36:53 -07:00
Johan T. Halseth
070eb0ec3e
zpay32: make expiry time only accessable using Expiry()
This commit renames the invoice field Expiry to expiry, and changes
the type from time.Time to time.Duration. Getting the value of the
field will now have to be done using the getter Expiry(), which
will also return the default invoice expiry (3600s) if it is not set
explicitly by the the invoice.
2017-09-27 13:17:18 +02:00
Johan T. Halseth
b645f02418
zpay32: move the BOLT-11 compatible invoice format to zpay32 namespace 2017-09-27 12:26:06 +02:00