Skip to content

Commit

Permalink
test: switch invoice tests to use proper bip173 name
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 authored and rustyrussell committed Feb 6, 2018
1 parent b30fb95 commit 0e59e09
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_lightningd.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def test_invoice(self):
inv = l1.rpc.invoice(123000, 'label', 'description')
after = int(time.time())
b11 = l1.rpc.decodepay(inv['bolt11'])
assert b11['currency'] == 'tb'
assert b11['currency'] == 'bcrt'
assert b11['created_at'] >= before
assert b11['created_at'] <= after
assert b11['payment_hash'] == inv['payment_hash']
Expand All @@ -363,13 +363,13 @@ def test_invoice(self):
# Check any-amount invoice
inv = l1.rpc.invoice("any", 'label2', 'description2')
b11 = inv['bolt11']
# Amount usually comes after currency (tb in our case),
# Amount usually comes after currency (bcrt in our case),
# but an any-amount invoices will have no amount
assert b11.startswith("lntb1")
assert b11.startswith("lnbcrt1")
# By bech32 rules, the last '1' digit is the separator
# between the human-readable and data parts. We want
# to match the "lntb1" above with the '1' digit as the
# separator, and not for example "lntb1m1....".
# to match the "lnbcrt1" above with the '1' digit as the
# separator, and not for example "lnbcrt1m1....".
assert b11.count('1') == 1

def test_invoice_expiry(self):
Expand Down

0 comments on commit 0e59e09

Please sign in to comment.