Minor changes

This commit is contained in:
Sergi Delgado Segura
2019-07-19 12:54:15 +01:00
parent 421c1b4973
commit a82c74b7c6
4 changed files with 12 additions and 4 deletions

1
.gitignore vendored
View File

@@ -11,6 +11,7 @@ logs/
.DS_Store
.idea
venv/*
conf.py
bitcoin.conf*
*__pycache__

View File

@@ -1,3 +1,8 @@
- Check all the interactions with core, figure out the edge cases and error codes
i.e: The justice transaction can already be in the blockchain the first time we push it
- Handle reconnection with ZMQ in case of broken pipe. The current version of the code fails if it does happen
- Start jobs according to the start time, jobs are now started when they are received
- Add DB
- Store jobs in DB until start time?
- Handle failures in the underlying system (i.e. bitcoind crashes)
- Add checks related with OP_CSV in justice tx and dispute_delta provided once the blob is decrypted
- Do not accept new appointments if the locator has already been used
- <s> Check all the interactions with core, figure out the edge cases and error codes i.e: The justice transaction can already be in the blockchain the first time we push it <s>
- <s> Handle reconnection with ZMQ in case of broken pipe. The current version of the code fails if it does happen <s>

View File

@@ -146,6 +146,7 @@ def check_txid_format(txid):
if len(txid) != 64:
sys.exit("locator does not matches the expected size (32-byte / 64 hex chars).")
# TODO: Check this regexp
return re.search(r'^[0-9A-Fa-f]+$', txid) is not None

View File

@@ -63,6 +63,7 @@ class Inspector:
elif len(locator) != 64:
rcode = errors.APPOINTMENT_WRONG_FIELD_SIZE
message = "wrong locator size ({})".format(len(locator))
# TODO: Check this regexp
elif re.search(r'^[0-9A-Fa-f]+$', locator) is None:
rcode = errors.APPOINTMENT_WRONG_FIELD_FORMAT
message = "wrong locator format ({})".format(locator)
@@ -161,7 +162,7 @@ class Inspector:
elif encrypted_blob == '':
# ToDo: We may want to define this to be at least as long as one block of the cipher we are using
rcode = errors.APPOINTMENT_WRONG_FIELD
message = "wrong encrypted_blob".format(t)
message = "wrong encrypted_blob"
if self.debug and message:
self.logging.error("[Inspector] {}".format(message))