mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 06:34:19 +01:00
Minor changes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,6 +11,7 @@ logs/
|
||||
|
||||
.DS_Store
|
||||
.idea
|
||||
venv/*
|
||||
conf.py
|
||||
bitcoin.conf*
|
||||
*__pycache__
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user