Check that routes are as expected in result
(node,
source,
destination,
amount_msat,
paths,
maxparts=50,
layers=[],
maxfee_msat=1000,
final_cltv=99)
| 710 | |
| 711 | |
| 712 | def check_getroute_paths(node, |
| 713 | source, |
| 714 | destination, |
| 715 | amount_msat, |
| 716 | paths, |
| 717 | maxparts=50, |
| 718 | layers=[], |
| 719 | maxfee_msat=1000, |
| 720 | final_cltv=99): |
| 721 | """Check that routes are as expected in result""" |
| 722 | getroutes = node.rpc.getroutes(source=source, |
| 723 | destination=destination, |
| 724 | amount_msat=amount_msat, |
| 725 | layers=layers, |
| 726 | maxfee_msat=maxfee_msat, |
| 727 | final_cltv=final_cltv, |
| 728 | maxparts=maxparts) |
| 729 | |
| 730 | assert getroutes['probability_ppm'] <= 1000000 |
| 731 | # Total delivered should be amount we told it to send. |
| 732 | assert amount_msat == sum([r['amount_msat'] for r in getroutes['routes']]) |
| 733 | |
| 734 | check_route_as_expected(getroutes['routes'], paths) |
| 735 | |
| 736 | |
| 737 | def test_getroutes(node_factory): |
no test coverage detected