Commit Graph
5 Commits
Author SHA1 Message Date
Daniel McNally e207f9ad71 multi: fix sever/server typos
Fixed sever/server typos and regenerated rpc.pb.go
2018-07-16 09:00:45 -04:00
Daniel McNally 56c01ebcfe rpcserver: passing active net to zpay32.Decode 2018-02-19 10:20:54 -05:00
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
Daniel McNally fdbdcf1560 zpay32: handle segwit prefixes > 2 chars
This change fixes a bug when an invoice is decoded for a network
whose bech32 segwit prefix is longer than 2 characters. The length
of the Bech32HRPSegwit network parameter is used to determine
where in the human-readable portion of the invoice the amount
begins, rather than assuming it begins after the first four
characters.

Decode() now throws an error when the encoded invoice does
not match the active network.

Changes the minimum hrp length check to >= 3 instead of >= 4.

Also removes a redundant "if ...; err != nil check" that was raising
a warning in invoice.go.
2018-02-19 10:18:16 -05:00
Daniel McNally 8543497dcc multi: fixing it's/its typos in comments 2018-02-06 19:13:07 -08:00