|
|
@ -61,6 +61,26 @@ def test_single_payment(node_factory, benchmark): |
|
|
|
benchmark(do_pay, l1, l2) |
|
|
|
|
|
|
|
|
|
|
|
def test_forward_payment(node_factory, benchmark): |
|
|
|
l1, l2, l3 = node_factory.line_graph(3, announce=True) |
|
|
|
|
|
|
|
def do_pay(src, dest): |
|
|
|
invoice = dest.rpc.invoice(1000, 'invoice-{}'.format(random.random()), 'desc')['bolt11'] |
|
|
|
src.rpc.pay(invoice) |
|
|
|
|
|
|
|
benchmark(do_pay, l1, l3) |
|
|
|
|
|
|
|
|
|
|
|
def test_long_forward_payment(node_factory, benchmark): |
|
|
|
nodes = node_factory.line_graph(21, announce=True) |
|
|
|
|
|
|
|
def do_pay(src, dest): |
|
|
|
invoice = dest.rpc.invoice(1000, 'invoice-{}'.format(random.random()), 'desc')['bolt11'] |
|
|
|
src.rpc.pay(invoice) |
|
|
|
|
|
|
|
benchmark(do_pay, nodes[0], nodes[-1]) |
|
|
|
|
|
|
|
|
|
|
|
def test_invoice(node_factory, benchmark): |
|
|
|
l1 = node_factory.get_node() |
|
|
|
|
|
|
|