Add an additional test/bench for routing larger amounts, score more
authorMatt Corallo <git@bluematt.me>
Thu, 11 May 2023 05:46:38 +0000 (05:46 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 11 May 2023 05:49:17 +0000 (05:49 +0000)
commit2775902f3ab0fd8a25a2ec83303fb959d7468abb
tree32e7fd4560d436a8169e1d45cb74cefa1b6a3005
parentfbaa3c4855ec3ebfb62fe91437f4237582db2577
Add an additional test/bench for routing larger amounts, score more

When benchmarking our router, we previously only ever tested with
amounts under 1,000 sats, which is an incredibly small amount.
While this ensures we have the maximal number of available channels
to consider, it prevents our scorer from getting exercise across
its range. Further, we only score the immediate path we are
expecting to to send over, and not randomly but rather based on the
amount sent.

Here we try to make the benchmarks a bit more realistic by adding
a new benchmark which attempts to send around 100K sats, which is
a reasonable amount to send over a channel today. We also convert
the scoring data to be randomized based on the seed as well as
attempt to (possibly) find a new route for a much larger value and
score based on that. This potentially allows us to score multiple
potential paths between the source and destination as the large
route-find may return an MPP result.
lightning/src/routing/router.rs