MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_pay_amounts

Function test_pay_amounts

tests/test_pay.py:95–106  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

93
94
95def test_pay_amounts(node_factory):
96 l1, l2 = node_factory.line_graph(2)
97 inv = l2.rpc.invoice(Millisatoshi("123sat"), 'test_pay_amounts', 'description')['bolt11']
98
99 invoice = only_one(l2.rpc.listinvoices('test_pay_amounts')['invoices'])
100
101 assert invoice['amount_msat'] == Millisatoshi(123000)
102
103 l1.dev_pay(inv, dev_use_shadow=False)
104
105 invoice = only_one(l2.rpc.listinvoices('test_pay_amounts')['invoices'])
106 assert invoice['amount_received_msat'] >= Millisatoshi(123000)
107
108
109def test_pay_limits(node_factory):

Callers

nothing calls this directly

Calls 6

MillisatoshiClass · 0.90
only_oneFunction · 0.90
line_graphMethod · 0.80
invoiceMethod · 0.45
listinvoicesMethod · 0.45
dev_payMethod · 0.45

Tested by

no test coverage detected