loop/loopd
Martin Habovstiak 84582bbb88 Improve error handling of config file
This makes two changes to handling of errors when configuration file
could not be loaded:

1. Only NotFound errors are considered OK - access errors and other FS
   issues are now treated as fatal.
2. Failing to load config file specified explicitly via `--configfile`
   option is alway a fatal error.

Rationale: If the configfile was specified explicitly then it indicates
the user really wishes to load it. While the user could want it to be
optionally loaded for extra configuration options, this can be
accomplished using an empty file.

If the config file was not specified explicitly then its' path was
computed from loop directory. If the file is inaccessible due to
permissions or other FS errors it's nearly certain other following
operations will fail as well. Failing early with a clear message is thus
beneficial.

This still leaves room for uncaught user error (e.g. mistakenly naming
config file inside loop dir as `loop.conf` instead of `loopd.conf`) but
it's greatly reduced and such error should be easier to identify.

(Indirectly) closes #412
2021-08-05 18:19:52 +02:00
..
config.go loopd: fix ALPN issue with Python 2021-07-13 22:04:28 +02:00
daemon.go multi: update lnd master with grpc-gateway upgrade 2021-07-29 17:02:06 +02:00
log.go multi: bump lnd to version v0.13.0-beta.rc2 2021-05-19 14:24:41 +02:00
macaroons.go loop: add support for the probe API 2021-07-30 13:22:12 +02:00
register_default.go multi: add force tick endpoint behind debug server 2020-10-15 13:53:27 +02:00
run.go Improve error handling of config file 2021-08-05 18:19:52 +02:00
swapclient_server.go loop: integrate the probe api with loop-in quote 2021-07-30 13:22:12 +02:00
swapclient_server_debug.go multi: add force tick endpoint behind debug server 2020-10-15 13:53:27 +02:00
swapclient_server_test.go loopd: verify loop out amount 2021-03-17 10:12:30 +02:00
utils.go multi: make server side restrictions function generic 2021-02-03 08:54:50 +02:00
view.go multi: integrate the new htlc v2 scripts to loop in/out 2020-09-09 19:54:01 +02:00