mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
test: switch invoice tests to use proper bip173 name
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
b30fb952e6
commit
0e59e091e7
@ -348,7 +348,7 @@ class LightningDTests(BaseLightningDTests):
|
||||
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']
|
||||
@ -363,13 +363,13 @@ class LightningDTests(BaseLightningDTests):
|
||||
# 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):
|
||||
|
Loading…
Reference in New Issue
Block a user