Commit Graph

248 Commits

Author SHA1 Message Date
Sergi Delgado Segura
b78c6ebfe7 Removes debug flags from old code 2019-10-11 19:07:46 +01:00
Salvatore Ingala
8acff789fe Add reference to github issue for the Todo 2019-10-11 11:27:03 +07:00
Salvatore Ingala
6348319dfb Using logging instead of print; added startup log message 2019-10-11 09:26:29 +07:00
Salvatore Ingala
99f3400d63 Added SIGTERM and SIGQUIT 2019-10-10 22:37:06 +07:00
Salvatore Ingala
9603138777 Added SIGINT signal handler 2019-10-10 22:25:20 +07:00
Sergi Delgado Segura
15c78072c9 Cleans comments + added method in generic exceptions
tx rejection comments moved to #37
2019-10-10 16:22:46 +01:00
Sergi Delgado Segura
6b058dfaf9 Fixes a couple of bugs from the last merge 2019-10-10 13:01:21 +01:00
Salvatore Ingala
8c2c893c5c Merge branch 'testing' into 21-json-logs 2019-10-10 18:49:06 +07:00
Salvatore Ingala
d05c2c21b7 warn ==> warning 2019-10-10 18:39:54 +07:00
Sergi Delgado Segura
eb2734ccfe Improves carrier
- Takes receipt out of Carrier
- Adds missing cases (implementation missing)
- Adds notes on what to check
2019-10-10 12:34:18 +01:00
Salvatore Ingala
9f25ef8603 Fixes from PR review 2019-10-10 18:22:33 +07:00
Salvatore Ingala
aea1d1f1e0 Fixes from PR review 2019-10-10 11:07:58 +07:00
Salvatore Ingala
dee93e5c62 Moved StructuredMessage and Logger to separate file; refactored pisa-cli logging using new format 2019-10-10 09:59:11 +07:00
Salvatore Ingala
c524319027 Several fixes and improvements 2019-10-10 09:59:11 +07:00
Salvatore Ingala
a53e7a82e3 Added 'actor' among the fields of the structured log messages; minor other fixes 2019-10-10 09:59:10 +07:00
Salvatore Ingala
4bcc8e20a0 Refactored check_tx_in_chain with new log format 2019-10-10 09:59:10 +07:00
Salvatore Ingala
bae9b6b913 Added Logger class; refactored logging accordingly 2019-10-10 09:59:10 +07:00
Salvatore Ingala
7f9c7d8609 Removed double initialization of logging 2019-10-10 09:58:28 +07:00
Salvatore Ingala
2a5dd48950 PEP8 linting 2019-10-10 09:58:27 +07:00
Salvatore Ingala
ed0cb4f632 Changed log format to JSON; fixed missing return value in get_potential_matches 2019-10-10 09:58:27 +07:00
Sergi Delgado Segura
8b62ff9e56 Update some comments/todos/discuss 2019-10-09 17:38:15 +01:00
Sergi Delgado Segura
b69ffdc0aa Adds some BlockProcessor unit tests.
The three last methods are missing, since they seem not to belong there (check #36)
2019-10-09 17:34:32 +01:00
Sergi Delgado Segura
ab72c71039 Adds appointment unit test 2019-10-09 15:19:33 +01:00
Sergi Delgado Segura
ecadbc62ef Adds _eq_ method to EncryptedBlob 2019-10-09 15:19:03 +01:00
Sergi Delgado Segura
e81ccd39a1 Adds API unit tests and modifies bitcoin_sim to be fixture compatible
- Adds unit tests for API
- Updates API to let BlockProcessor deal with block block related JSON-RPC
- Fixes BlockProcessor get_potential_matches return
- Makes bitcoin_sim runnable via function (instead of a main runnable script) to work with pytests fixture
- <3 Fixture
2019-10-08 18:55:27 +01:00
Sergi Delgado Segura
8403f871ca Adds EncryptedBlob unittests 2019-10-07 16:56:55 +01:00
Sergi Delgado Segura
88532f7345 Changes derypt key input type and return
The input types for Blob.encrypt and EncryptedBlob.decrypt were not consistent. The former was in hex whereas the later was in bytes. Format the later in hex for consistency.
2019-10-07 16:47:54 +01:00
Sergi Delgado Segura
d2a07d6519 More clean up 2019-10-07 15:36:58 +01:00
Sergi Delgado Segura
4be506412e Adds Inspector unittests. Fixes some related bugs. 2019-10-07 15:19:34 +01:00
Sergi Delgado Segura
23efd48796 Fixes logging bug introduced in 93e23e7
When cleaning up code in commit 93e23e7 a condition was removed that makes the inspector log empty data.
2019-10-07 11:47:21 +01:00
Sergi Delgado Segura
1e18630ce2 Adds Cleaner tests. Fixes Cleaner, Watcher and Responder
There is no need to return the dictionaries modified by the client since they are "passed-by-reference" in Python.
2019-10-04 17:23:45 +01:00
Sergi Delgado Segura
4704462502 Increases responder modularity
The responder had way too complex functions. Separate them into smaller / more specific ones to increse modularity and code reuse.
2019-10-04 13:52:51 +01:00
Sergi Delgado Segura
3ed9ccd466 Adds additional functionality that will be needed when deploying data persistence 2019-10-04 13:50:43 +01:00
Sergi Delgado Segura
9a37b211a0 Adds Carrier to take care of sending/getting transactions 2019-10-04 13:49:48 +01:00
Sergi Delgado Segura
3e0cca14d7 Clean up + higher modular design 2019-10-03 11:49:49 +01:00
Sergi Delgado Segura
5ba6fcb9ef Improves modularity of the code
Adds cleaner and block processor to increase the modularity and reuse of the code
2019-10-03 11:49:24 +01:00
Sergi Delgado Segura
e9832e4408 More clean up 2019-10-03 11:47:07 +01:00
Sergi Delgado Segura
93e23e769f Code clean up
Deletes debug/logging pair. Defines logging and bitcoin_cli as system-wide variables
2019-10-02 17:03:43 +01:00
Sergi Delgado Segura
9bb3b38b3f Clears old commented code 2019-08-27 11:21:08 +02:00
Sergi Delgado Segura
ebac9b003e Updates api to match the net internal data structures 2019-08-26 16:26:53 +02:00
Sergi Delgado Segura
ae2cf26195 Improves internal data structures and reorgs the code for readability 2019-08-26 16:26:29 +02:00
Sergi Delgado Segura
400e524c36 Changes appointment structure
Updates the former appointment structure from `dicts` containing `lists` accessed by `index` to `dicts` containing `dicts` identified by `uuid4`. Needs testing.
2019-08-20 11:54:04 +01:00
Sergi Delgado Segura
51bafa323a Improves the simulator and adds some tests
The simulator now return the proper error messages when incorrect data is pased on RPC calls. Functionality for forks is missing.
2019-08-16 17:01:16 +01:00
Sergi Delgado Segura
d34ccc46a1 Adds/Updates further comments and fixes small issues 2019-08-13 12:03:36 +01:00
Sergi Delgado Segura
a4350f0c35 Creates a speciall error code for unexpected error
The rationale behind this is being able to identify exceptions that we may not be taking into account
2019-08-12 14:05:04 +01:00
Sergi Delgado Segura
69e361f46e Updates response code when appointment is valid but rejected 2019-08-12 14:03:58 +01:00
Sergi Delgado Segura
0978d0bf9e Adds a bunch of comments related to the open issues. Clear old comments. 2019-08-12 14:02:41 +01:00
Sergi Delgado Segura
1cde4a2a11 refactors project structure 2019-08-12 13:24:04 +01:00