Check that routes are as expected in result
(node,
source,
destination,
amount_msat,
paths,
maxparts=50,
layers=[],
maxfee_msat=1000,
final_cltv=99)
| 663 | |
| 664 | |
| 665 | def check_getroute_paths(node, |
| 666 | source, |
| 667 | destination, |
| 668 | amount_msat, |
| 669 | paths, |
| 670 | maxparts=50, |
| 671 | layers=[], |
| 672 | maxfee_msat=1000, |
| 673 | final_cltv=99): |
| 674 | """Check that routes are as expected in result""" |
| 675 | getroutes = node.rpc.getroutes(source=source, |
| 676 | destination=destination, |
| 677 | amount_msat=amount_msat, |
| 678 | layers=layers, |
| 679 | maxfee_msat=maxfee_msat, |
| 680 | final_cltv=final_cltv, |
| 681 | maxparts=maxparts) |
| 682 | |
| 683 | assert getroutes['probability_ppm'] <= 1000000 |
| 684 | # Total delivered should be amount we told it to send. |
| 685 | assert amount_msat == sum([r['amount_msat'] for r in getroutes['routes']]) |
| 686 | |
| 687 | check_route_as_expected(getroutes['routes'], paths) |
| 688 | |
| 689 | |
| 690 | def test_getroutes(node_factory): |
no test coverage detected