Skip to content
Snippets Groups Projects
Commit 8ea55dea authored by Jeffrey Zhang's avatar Jeffrey Zhang
Browse files

Find source of comparison error?

parent fd0cc211
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,7 @@ class TransactionDeliverer:
if item.priority == queue_item.priority and item.proposer == queue_item.proposer and item.transaction_message != queue_item.transaction_message:
print(queue_item)
print(item)
raise Exception
self.transactions_id_map[transaction_message.transaction_ID] = queue_item
......@@ -117,6 +118,7 @@ class TransactionDeliverer:
if item.priority == queue_item.priority and item.proposer == queue_item.proposer and item.transaction_message != queue_item.transaction_message:
print(queue_item)
print(item)
raise Exception
self.transactions_id_map[transaction_message.transaction_ID] = queue_item
......@@ -135,6 +137,7 @@ class TransactionDeliverer:
if item.priority == queue_item.priority and item.proposer == queue_item.proposer and item.transaction_message != queue_item.transaction_message:
print(queue_item)
print(item)
raise Exception
queue_item.priority_confirmations+=1
......@@ -153,6 +156,9 @@ class TransactionDeliverer:
def process_agreed_priority_message(self, agreed_priority_message: AgreedPriorityMessage):
queue_item = self.transactions_id_map[agreed_priority_message.transaction_ID]
# TODO - the comparison tie error is introduced here!
# Because we don't also update the proposer!
queue_item.priority = agreed_priority_message.agreed_priority
try:
......@@ -163,6 +169,7 @@ class TransactionDeliverer:
if item.priority == queue_item.priority and item.proposer == queue_item.proposer and item.transaction_message != queue_item.transaction_message:
print(queue_item)
print(item)
raise Exception
queue_item.transaction_message.deliverable = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment