Commit Graph

15 Commits

Author SHA1 Message Date
Christian Decker
4a5f7a0cce probe: Allow the caller to specify the amount to probe
We used to only probe for a 10sat amount, which allows us to test
basic reachability, but it doesn't say much about whether we can
actually pay for something reasonable, so this fixes that.

This may require the following SQL statement to be applied to the
database if you are upgrading from a prior version:

```sql
ALTER TABLE probes ADD amount INTEGER;
```

This is not required if you start with a new database.
2021-03-25 14:47:17 +01:00
Michael Schmoock
1002a62aa2 probe: fix flake8 nits 2020-12-13 15:36:15 +01:00
Michael Schmoock
f2a0f50501 probe: fix flake8 nits 2020-12-13 15:36:15 +01:00
darosior
e426f6738e Update to pyln-client
This updates all plugins *which already have requirements.txt* to
pyln-client from pylightning.
2019-12-27 17:17:58 +01:00
darosior
5262f065d4 probe: pass the request argument to thread 2019-10-24 15:18:13 +02:00
darosior
779e0dce5a probe: use 'listsendpays' instead of 'listpayments'
'listpayments' is not part our lives anymore
2019-09-20 19:43:30 +02:00
darosior
0c217383e8 probe: change parameters order to allow threading
Otherwise the thread start() would return 'probe(): missing one positionnal argument'
2019-09-20 19:43:30 +02:00
Christian Decker
3532288db1 probe: Add the traceroute method to the probe plugin
This just tries all prefixes of a route to the given node, returning a failure
as soon as it hits the channel that got the payment stuck.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-02 22:58:48 +02:00
Christian Decker
8b24e19bbb probe: Add probe-stats method to show some general statistics
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-02 22:58:48 +02:00
Christian Decker
e4f8d2d0b8 probe: Poll for probe completion instead of waiting
This just polls pending probes and calls a callback upon completion.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-02 22:58:48 +02:00
Christian Decker
0484d88cda probe: Made probe an async_method so we can run in parallel
Since `probe` may take a while, or hang altogether we better make it async so
we can run multiple ones in parallel. The next step is to have a sweeper
thread that just checks all pending probes.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-02 22:58:48 +02:00
Christian Decker
439ff65f14 probe: Allow probing for a specific node
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-02 22:58:48 +02:00
Christian Decker
54efa366e3 probe: Actually add a sensible return value to the probe method
It was returning `null` and we'd have to check the logs or the DB for the
result. This makes it just a bit easier to see what happens.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-05-09 12:46:30 +02:00
Christian Decker
09faaeb759 probe: Run probes in their own thread
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-02-20 20:10:39 +01:00
Christian Decker
4f31f5971a probe: Added a very simple probe plugin
This is a plugin that regularly probes the network by sending a random payment
to a random destination. These do not succeed, since we randomly selected the
`payment_hash`, but can still give us a lot of insight into the network
health.

The plugin stores its results in a `sqlite3` database for later inspection.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-02-11 13:53:03 +01:00