Sergi Delgado Segura
a49e587d7c
watcher - adds RWLocks for the LocatorCache
...
Threads should aboit reading the cache when it is being updated/fixed. The latter is specially relevant since during a reorg most of the cache may change.
2020-06-15 11:25:26 +02:00
Sergi Delgado Segura
df326465a7
watcher - Updates the LocatorCache so it is self handled
...
With the current approach the cache deals with deletion and provides getters and setters so consumers do not directly access the internals
2020-06-10 17:44:50 +02:00
Sergi Delgado Segura
6ea3e8e3ff
watcher - simplifies locator_cache and check_breach
...
locator_cache.blocks was storing a dictionary with both the locator and txid pair, when only the locators were actually necessary. Reworks the code a bit to only use locators.
check_breach was returning some values that could be worked out from the unaltered inputs.
Also fixes some comments and docs.
2020-06-03 17:23:29 +02:00
Sergi Delgado Segura
e1aab63940
tests - unit tests LocatorCache reorg protection
2020-05-22 19:57:48 +02:00
Sergi Delgado Segura
2a52006c03
tests - Removes Wartcher from LocatorCache tests
2020-05-22 19:56:16 +02:00
Sergi Delgado Segura
708f2e1f3b
teos - Changes the behavior for updates of already triggered appointments
...
If an update for an already triggered appointment is received, it will be drop no matter if the locator is in the cache or not. This tries to prevent inconsistencies between the Watcher and the Responder, specially in the case of a reorg when data may have to flow backwards.
2020-05-21 19:37:33 +02:00
Sergi Delgado Segura
3228eeac6b
tests - Adds LocatorCache unittests and updates existing ones to match
2020-05-21 17:06:20 +02:00
Sergi Delgado Segura
e7141b295e
watcher - wipes completed/expired appointments from the Gatekeeper
2020-04-22 14:55:10 +02:00
Sergi Delgado Segura
797cb9786e
Adds new gatekeeper tests
2020-04-20 17:59:47 +02:00
Sergi Delgado Segura
eb8ffb4916
Adaps unit tests. Speeds up tests by removing unnecesary sleeps
2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
08701f0fee
Refactors Cryptographer to remove logs and avoid multi return types
...
Cryptographer now uses exceptions to report errors and does not use the log anymore
2020-04-20 17:30:16 +02:00
Sergi Delgado Segura
71507d4c32
Gets rid of blob classes. Close #66
2020-04-20 17:30:16 +02:00
Sergi Delgado Segura
4a3f4bc522
Addapts tests to match 7031b552f7. Improves DBManager tests.
2020-04-01 17:19:41 +02:00
Sergi Delgado Segura
f55e37b0fc
Adds unit test for watcher.get_appointment_summary
2020-03-30 16:22:52 +02:00
Sergi Delgado Segura
772f634d1f
Sets MAX_APPOINTMENTS for Watcher unit tests to a small testable value (100)
2020-03-27 14:57:19 +01:00
Sergi Delgado Segura
5d46049f31
Adapts Watcher unit tests to the new uuid apporach
2020-03-26 19:06:38 +01:00
Sergi Delgado Segura
cb79e51d09
Refactors the tests to match the new class definitions and config formats
2020-03-20 21:38:29 +01:00
Sergi Delgado Segura
7c7ff909d7
pisa -> teos
2020-03-17 15:47:38 +01:00