mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 06:34:19 +01:00
Add comments for multiple issues
This commit is contained in:
@@ -10,7 +10,7 @@ import json
|
||||
from utils.authproxy import AuthServiceProxy
|
||||
from conf import BTC_RPC_USER, BTC_RPC_PASSWD, BTC_RPC_HOST, BTC_RPC_PORT
|
||||
|
||||
|
||||
# ToDo: #5-add-async-to-api
|
||||
app = Flask(__name__)
|
||||
HTTP_OK = 200
|
||||
HTTP_BAD_REQUEST = 400
|
||||
|
||||
@@ -5,8 +5,8 @@ from pisa.encrypted_blob import EncryptedBlob
|
||||
class Appointment:
|
||||
def __init__(self, locator, start_time, end_time, dispute_delta, encrypted_blob, cipher, hash_function):
|
||||
self.locator = locator
|
||||
self.start_time = start_time
|
||||
self.end_time = end_time
|
||||
self.start_time = start_time # ToDo: #4-standardize-appointment-fields
|
||||
self.end_time = end_time # ToDo: #4-standardize-appointment-fields
|
||||
self.dispute_delta = dispute_delta
|
||||
self.encrypted_blob = EncryptedBlob(encrypted_blob)
|
||||
self.cipher = cipher
|
||||
@@ -19,9 +19,7 @@ class Appointment:
|
||||
|
||||
return appointment
|
||||
|
||||
# ToDO: We may want to add some additional things to the appointment, like
|
||||
# minimum fee
|
||||
# refund to be payed to the user in case of failing
|
||||
# ToDO: #3-improve-appointment-strcuture
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ class Inspector:
|
||||
|
||||
return rcode, message
|
||||
|
||||
# DISCUSS: ANYTHING TO CHECK HERE?
|
||||
# ToDo: #5-define-checks-encrypted-blob
|
||||
def check_blob(self, encrypted_blob):
|
||||
message = None
|
||||
rcode = 0
|
||||
@@ -160,7 +160,7 @@ class Inspector:
|
||||
rcode = errors.APPOINTMENT_WRONG_FIELD_TYPE
|
||||
message = "wrong encrypted_blob data type ({})".format(t)
|
||||
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
|
||||
# ToDo: #5 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"
|
||||
if self.debug and message:
|
||||
|
||||
@@ -2,7 +2,7 @@ import zmq
|
||||
import binascii
|
||||
from conf import FEED_PROTOCOL, FEED_ADDR, FEED_PORT
|
||||
|
||||
|
||||
# ToDo: #7-add-async-back-to-zmq
|
||||
class ZMQHandler:
|
||||
""" Adapted from https://github.com/bitcoin/bitcoin/blob/master/contrib/zmq/zmq_sub.py"""
|
||||
def __init__(self, parent):
|
||||
|
||||
Reference in New Issue
Block a user