Sergi Delgado Segura
ae4cea8aa2
plugin - Adds additional tower tests
2020-05-05 15:19:36 +02:00
Sergi Delgado Segura
03eb67f71f
plugin - Some fixes and renaming
2020-05-05 15:19:31 +02:00
Sergi Delgado Segura
01a18b3fd7
Finishes basic test
2020-05-04 19:40:54 +02:00
Sergi Delgado Segura
d3cbfc7ac4
string format -> f-function
2020-05-04 19:40:00 +02:00
Sergi Delgado Segura
93029301bf
Refactors plugin to have a single point of db data loading
...
The previous approach was a bit messy with the db access and could have potential race conditions and data inconsistency
Also replaces format for f-functions for readability
2020-05-04 19:37:13 +02:00
Sergi Delgado Segura
cf5455043c
plugin - adds some plugin tests, still WIP
2020-04-30 21:53:51 +02:00
Sergi Delgado Segura
43217874b5
Splits add_appointment so it can also be used by the Retrier
...
- The appointment constructions is left in Watchtower (via on_commit_revocation method)
- The tower interaction is moved to net/http so it can be reused
- Adds missing logic for invalid resposes by the tower (e.g invalid signatures)
2020-04-29 14:14:01 +02:00
Sergi Delgado Segura
7bbfd925f4
Adds invalid appointment to tower_info
...
Invalid appointments are those which tower signature is invalid
2020-04-29 13:11:44 +02:00
Sergi Delgado Segura
8575bc6209
plugin - redesigns retrier using backoff
2020-04-29 13:10:51 +02:00
Sergi Delgado Segura
9f2c90d12e
plugin - adds Retrier and improves get_tower_info and listtowers
...
- Logs data identified by tower_id instead of endpoint
- Adds Retrier to deal with retries (for connection errors and rejects) and moves sending logic to net/http
- Adds pending appointments to TowerInfo and serves that information via `get_tower_info` and `list_towers`
- Deals with connection errors (but not with rejections yet)
2020-04-27 19:56:35 +02:00
Sergi Delgado Segura
fa0e103d71
pluggin - adds basic retrier (WIP)
2020-04-27 19:56:31 +02:00
Sergi Delgado Segura
780cb5c202
pluggin - adds pending appointments to towers
2020-04-27 19:51:39 +02:00
Sergi Delgado Segura
c7ec4e6b7c
pluggin - Moves send_appointment to net so it can be reused for retries
...
Also changes logs so towers are identified by id
2020-04-27 19:51:34 +02:00
Sergi Delgado Segura
bc5f09000a
plugin - adds tower state to TowerInfo
...
The state flags whether the tower is reachable or not so the user can be aware of it
2020-04-27 18:23:58 +02:00
Sergi Delgado Segura
7b3bc6e6a8
plugin - adds gettowersinfo command to get all local data about a tower (from db)
2020-04-23 12:54:16 +02:00
Sergi Delgado Segura
fd4241bfe3
plugin - improves listtowers output to resemble listpeers
2020-04-23 12:54:08 +02:00
Sergi Delgado Segura
df3531dd3e
plugin - several improvements in the main class
...
- Moves from *args to required params after 5f33d63cb6
- tower.endpoint -> tower.netaddr
- Adds basic exception handling logic in add_appointemnt
- Stores appointment data in the database (locator: signature) and keeps summary on memory
2020-04-23 12:49:26 +02:00
Sergi Delgado Segura
d86112d86e
plugin - endpoint -> netaddr in TowerInfo and adds get_summary
2020-04-23 12:44:25 +02:00
Sergi Delgado Segura
5f33d63cb6
plugin - simplifies argparser after https://github.com/ElementsProject/lightning/pull/3640
2020-04-23 12:43:16 +02:00
Sergi Delgado Segura
7b6d4a0c9c
plugin - specifies cryptography library version
2020-04-23 12:40:24 +02:00
Sergi Delgado Segura
4e1c3e83cf
Removes start/end_time from plugin
2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
1ec69e8703
Stops plugin if towers db cannot be accessed
2020-04-20 17:30:17 +02:00
Sergi Delgado Segura
96d98a3546
compressed_pk -> user_id and logs id on bootstrap
2020-04-20 17:30:17 +02:00
Sergi Delgado Segura
a1a87ba9da
Can't -> cannot
2020-04-20 17:30:17 +02:00
Sergi Delgado Segura
2242e780dd
Fixes log level and register command
2020-04-20 17:30:16 +02:00
Sergi Delgado Segura
6b025a2d9c
Improves add_appointment method. Has some pending fixmes
...
- Start and end time have to be dealt with (changes required on the tower side)
- Sends appointments to every register tower. We may want to manage this better
2020-04-20 17:30:16 +02:00
Sergi Delgado Segura
b4ea005f55
Adds parse methods for add_appointment
2020-04-20 17:30:16 +02:00
Sergi Delgado Segura
80e72f089d
Splits exceptions in common + client
2020-04-20 17:30:15 +02:00
Sergi Delgado Segura
b3841c1da6
Updates defaults names
2020-04-20 17:30:15 +02:00
Sergi Delgado Segura
ed8ff228d8
First commands with basic structure.
...
- Moves DBManager to common.
2020-04-20 17:30:15 +02:00