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

Function test_pay

tests/benchmark.py:119–130  ·  view source on GitHub ↗
(node_factory, benchmark)

Source from the content-addressed store, hash-verified

117
118
119def test_pay(node_factory, benchmark):
120 l1, l2 = get_bench_line_graph(node_factory, 2)
121
122 invoices = []
123 for _ in range(1, 100):
124 invoice = l2.rpc.invoice(1000, 'invoice-{}'.format(random.random()), 'desc')['bolt11']
125 invoices.append(invoice)
126
127 def do_pay(l1, l2):
128 l1.rpc.xpay(invoices.pop())
129
130 benchmark(do_pay, l1, l2)
131
132
133def test_start(node_factory, benchmark):

Callers

nothing calls this directly

Calls 2

get_bench_line_graphFunction · 0.85
invoiceMethod · 0.45

Tested by

no test coverage detected