Check that the amount received matches the amount requested in the invoice.
(node_factory)
| 228 | |
| 229 | |
| 230 | def test_amounts(node_factory): |
| 231 | """ |
| 232 | Check that the amount received matches the amount requested in the invoice. |
| 233 | """ |
| 234 | l1, l2 = node_factory.line_graph(2, opts={'allow-deprecated-apis': True}) |
| 235 | inv = l2.rpc.invoice(Millisatoshi(123456), "test_pay_amounts", "description")[ |
| 236 | "bolt11" |
| 237 | ] |
| 238 | |
| 239 | invoice = only_one(l2.rpc.listinvoices("test_pay_amounts")["invoices"]) |
| 240 | |
| 241 | assert invoice["amount_msat"] == Millisatoshi(123456) |
| 242 | |
| 243 | l1.rpc.call("renepay", {"invstring": inv, "dev_use_shadow": False}) |
| 244 | |
| 245 | invoice = only_one(l2.rpc.listinvoices("test_pay_amounts")["invoices"]) |
| 246 | assert invoice["amount_received_msat"] >= Millisatoshi(123456) |
| 247 | |
| 248 | |
| 249 | def test_limits(node_factory): |
nothing calls this directly
no test coverage detected