Test if askrene can resolve a route with dummy channels, ie. channels that we might set artificially to resolve blinded paths and self payments, they have unlimited capacities and possibly zero fees.
(node_factory)
| 1887 | |
| 1888 | |
| 1889 | def test_simple_dummy_channel(node_factory): |
| 1890 | """Test if askrene can resolve a route with dummy channels, ie. channels |
| 1891 | that we might set artificially to resolve blinded paths and self payments, |
| 1892 | they have unlimited capacities and possibly zero fees.""" |
| 1893 | ALOT = "2100000000000000sat" |
| 1894 | node1 = "020000000000000000000000000000000000000000000000000000000000000001" |
| 1895 | node2 = "020000000000000000000000000000000000000000000000000000000000000002" |
| 1896 | l1 = node_factory.get_node() |
| 1897 | l1.rpc.askrene_create_layer("mylayer") |
| 1898 | l1.rpc.askrene_create_channel( |
| 1899 | layer="mylayer", |
| 1900 | source=node1, |
| 1901 | destination=node2, |
| 1902 | short_channel_id="0x0x0", |
| 1903 | capacity_msat=ALOT, |
| 1904 | ) |
| 1905 | l1.rpc.askrene_update_channel( |
| 1906 | layer="mylayer", |
| 1907 | short_channel_id_dir="0x0x0/0", |
| 1908 | enabled=True, |
| 1909 | htlc_minimum_msat=0, |
| 1910 | htlc_maximum_msat=ALOT, |
| 1911 | fee_base_msat=0, |
| 1912 | fee_proportional_millionths=0, |
| 1913 | cltv_expiry_delta=5, |
| 1914 | ) |
| 1915 | l1.rpc.getroutes( |
| 1916 | source=node1, |
| 1917 | destination=node2, |
| 1918 | amount_msat=100, |
| 1919 | maxfee_msat=5000, |
| 1920 | final_cltv=5, |
| 1921 | layers=["mylayer"], |
| 1922 | ) |
| 1923 | |
| 1924 | |
| 1925 | def test_maxparts_infloop(node_factory, bitcoind): |