Antoine Poinsot
61c97e11ef
jitrebalance: try as much routes as possible; don't stop at 5
...
Signed-off-by: Antoine Poinsot <darosior@protonmail.com >
2020-06-02 11:59:12 +02:00
Antoine Poinsot
bee26113c0
jitrebalance: don't assume that 'listchannels' results contains 2 entries
...
Signed-off-by: Antoine Poinsot <darosior@protonmail.com >
2020-05-27 14:51:28 +02:00
Antoine Poinsot
386d4eaa6d
jitrebalance: handle the absence of the 'erring_channel' field
...
On failed 'sendpay'.
Signed-off-by: Antoine Poinsot <darosior@protonmail.com >
2020-05-27 14:51:28 +02:00
Antoine Poinsot
18632df38c
jitrebalance: add the direction of erring channel on failed sendpay
...
Signed-off-by: Antoine Poinsot <darosior@protonmail.com >
2020-05-27 14:51:28 +02:00
Christian Decker
d34cb6e637
jitrebalance: Do not attempt to access scid on unconfirmed channels
...
Fixes #88
2020-05-27 12:34:57 +02:00
Christian Decker
9ebc175542
jitrebalance: Fix error when computing negative msat amounts
2020-05-27 12:34:57 +02:00
Christian Decker
18d03962df
jitrebalance: Add a test to reproduce issue #88
...
I'm expecting it to be because we access the short_channel_id
indiscriminately, which is unsafe if the channel is not confirmed yet, i.e.,
it doesn't have a scid yet.
2020-05-27 12:34:57 +02:00
Christian Decker
f852851184
travis: Try to get coverage reporting inside the plugins working
2020-05-27 12:34:57 +02:00
Michael Schmoock
920f414ab0
drain: adds test cases
2020-05-23 13:38:01 +02:00
Michael Schmoock
9579baa186
drain: fix error handling
2020-05-23 13:38:01 +02:00
Michael Schmoock
d66ea9f8e5
drain: refactor and cleanup
2020-05-23 13:38:01 +02:00
Michael Schmoock
6f0380bdfb
drain: fix receivable and 3ksat margin workaround
2020-05-23 13:38:01 +02:00
Michael Schmoock
eaee585f16
drain: fix zero division edge cases
2020-05-23 13:38:01 +02:00
Michael Schmoock
d1559bed1d
doc: adds README entry for drain
2020-05-23 13:38:01 +02:00
Michael Schmoock
7edf97ed43
doc: specify writing and running tests
2020-05-23 13:38:01 +02:00
Christian Decker
b8836f7ece
autoreload: Abort if we can't locate the child plugin
2020-05-18 22:44:49 +02:00
Christian Decker
e8945237d4
travis: Reduce verbosity and reduce timeout
2020-05-18 22:44:49 +02:00
Christian Decker
a1f005012a
backup: Perform preflight checks before entering the plugin loop
2020-05-18 22:44:49 +02:00
Christian Decker
fbc494ec23
backup: Kill lightningd instead of the roundabout way around
...
Looking up the process parents and searching for `lightnignd` allows us to
kill directly. It also means we no longer have to wait for the RPC to be
enabled to abort.
2020-05-18 22:44:49 +02:00
Christian Decker
63c9872ec2
autoreload: Add tests and warning when manifest changes
...
Rene pointed out that we were silently accepting an updated manifest despite
not actually being able to register it with `lightningd`. This meant that if
options, RPC methods, hooks or notifications get added or removed they will
not be wired in correctly.
The warning is really obnoxious and multi-line to draw the attention.
Suggested-by: Rene Pickhardt <@renepickhardt>
2020-05-18 22:44:49 +02:00
Christian Decker
8668a2244d
noise: Disabled retry test for being way too flaky
2020-05-18 22:44:49 +02:00
Christian Decker
9b5a9076d4
backup: Fix flaky test due to logs being dropped on shutdown
...
We were writing logs directly before killing `lightningd` which resulted in
the logs being lost. The subsequent check for the log-lines then would fail
obviously.
2020-05-18 22:44:49 +02:00
Christian Decker
162b5cc977
persistent-channels: Use the correct parameter name
...
Some time ago we switched from `satoshi` to `amount` encoded as a suffixed
amount.
2020-05-18 22:44:49 +02:00
Sebastian Geisler
9a1cf235d3
Add forwarding and fee metrics
2020-05-15 16:47:29 +02:00
Sebastian Falbesoner
62e237235d
helpme: fix out of range access in configfile parser
2020-05-08 18:16:17 +02:00
Christian Decker
41e440522e
backup: NF wrapper was missing a keyword arg
2020-04-30 17:52:16 +02:00
Sebastian Geisler
279a4e821f
Avoid hyphens in label names
2020-04-30 15:37:49 +02:00
Antoine Poinsot
bfab383959
No more pylightning imports !
...
```
$ grep -rE '^import lightning$|^from lightning'
```
Signed-off-by: Antoine Poinsot <darosior@protonmail.com >
2020-04-30 15:07:56 +02:00
Antoine Poinsot
810bedddc0
sauron: strictly exit when no endpoint
...
The exception might be excepted, and we would continue execution. This works better after https://github.com/ElementsProject/lightning/pull/3675 which will immediately make lightningd die if we exit
Signed-off-by: Antoine Poinsot <darosior@protonmail.com >
2020-04-30 15:07:56 +02:00
Michal Rostecki
8438491350
backup: Add flaky to requirements
...
Signed-off-by: Michal Rostecki <mrostecki@mailfence.com >
2020-04-15 21:00:30 +02:00
Michal Rostecki
e7c1ae60a1
backup: Remove duplicate call of initialize()
...
Before this change, backup backend was initialized twice - in on_init()
and get_backend() functions. This change leaves only one call in
get_backend() and adds a kwarg determining whether init failure should
be fatal.
Signed-off-by: Michal Rostecki <mrostecki@mailfence.com >
2020-04-15 21:00:30 +02:00
Christian Decker
ef31a4ac85
backup: Refuse to create a new FileBakend if the backing file exists
2020-04-12 19:35:21 +02:00
Christian Decker
ce49404eb4
backup: Add PRAGMA foreign_keys=on when restoring so cascades work
...
We heavily rely on foreign key constraints to keep the DB consistent and drop
dependent objects such as UTXO set entries when we roll back a block. We also
need to enable the foreign key constraints when restoring otherwise these
dependents are not removed and we run into constraint violations.
2020-04-12 19:35:21 +02:00
Christian Decker
3a399fd55c
backup: Temporarily use a wrapper of the node_factory
...
The node_factory from pyln-client clears the node directory when provisioning
a new node, which interferes with the backup-cli creation of the initial
snapshot. This just disables the cleaning until we can release the next
pyln-client version
2020-04-12 19:35:21 +02:00
Christian Decker
0ed717b3d1
backup: Add restore functionality to the backup-cli utility
2020-04-12 19:35:21 +02:00
Christian Decker
a68758b1d0
backup: Implement the restore method for all backends
...
Also implements the `stream_changes` function in the FileBackend which is used
by `restore` to get all the changes.
2020-04-12 19:35:21 +02:00
Christian Decker
caa5c0a16b
backup: Add the version to the FileBackend format
2020-04-12 19:35:21 +02:00
Christian Decker
8f2eea2840
backend: Make sure that initialize initializes the metadata
2020-04-12 19:35:21 +02:00
Christian Decker
1e6b55b3cb
backup: If a database exists write an intial snapshot
2020-04-12 19:35:21 +02:00
Christian Decker
a44284d04d
pytest: Test starting without having initialized the backup
2020-04-12 19:35:21 +02:00
Christian Decker
c8502cd09d
backup: Add missing Click dependency for the backup-cli tool
2020-04-12 19:35:21 +02:00
Christian Decker
4c146bf2a4
backend: Use th backup URL in backup-cli and add snapshot type to FileBackend
2020-04-12 19:35:21 +02:00
Christian Decker
c58e675877
backup: Ensure at startup that the backup backend was initialized
2020-04-12 19:35:21 +02:00
Christian Decker
97c702731a
backup: Add a bit more documentation to the abstract backend class
2020-04-12 19:35:21 +02:00
Christian Decker
4e19c32444
backup: Add backup-cli tool and use it to initialize the backups
2020-04-12 19:35:21 +02:00
Christian Decker
c049069cff
backup: Initial version of the backup plugin
2020-04-12 19:35:21 +02:00
Christian Decker
c3c207967f
Update pillow to a secure version
2020-04-04 19:20:03 +02:00
Christian Decker
02d41edd10
Update twisted to a secure version
2020-04-04 19:20:03 +02:00
darosior
714c28c369
sauron: cleanups: better errors, no assert, no useless json.loads
2020-04-03 16:29:07 +02:00
darosior
970a965430
sauron: use esplora to get raw blocks
2020-04-03 16:29:07 +02:00