CLN v26.06 deprecates the getroute JSON-RPC in favor of the
askrene-backed getroutes (plugins/topology.c:615-620,
doc/developers-guide/deprecated-features.md). On lightningd
configurations where deprecated APIs are disabled (developer mode
or explicit allow-deprecated-apis=false), every getroute call
fails with -32601; as a result every Dowser run returns 0msat and
the Janitor rejects every candidate it considers.
The previous algorithm ran getroute up to 10 times with accumulated
excludes, then queried listchannels per hop to estimate bottleneck
capacity. The new code makes a single getroutes call asking askrene
to deliver a 1_000_000 sat probe via up to maxparts=10 paths. On
success the sum of routes[*].amount_msat (less a 1.5% reserve
factor preserved from the legacy code) is reported as the dowsed
capacity; on any RpcError (including 205 "Unable to find a route"
and 206 "Route too expensive") the dowsed capacity is 0msat. ~40
RPC roundtrips per dowse collapse to 1.
Probe parameters chosen generously to avoid spurious 206 errors
masking real route availability: 5_000 sat max-fee, 14-block
final-cltv, layers ["auto.localchans","auto.sourcefree"]. These
can be tuned after observing behavior on signet.
Drive-by: Run::self_id (and the plumbing that fed it) is removed
along with three now-unused includes. The legacy algorithm seeded
its excludes vector with self_id; the new design has no excludes.
Highest-leverage of CLBOSS's four getroute call sites; the other
three (ChannelCandidateMatchmaker, ActiveProber,
FundsMover/Attempter) follow in subsequent commits/PRs.
Channel directions can be individually active or inactive, which affects
routing directions.
Thus, a dowsing request in on direction may have a different result in
the opposite direction.
Existing clients of the `Dowser` assume the first argument is the source
(proposal) and the second argument is the destination (patron), but the
`Dowser` used the first argument as the destination instead.
This also flips the `Dowser` direction.