beautified transactions print and fixed menu input
This commit is contained in:
parent
0219a8a7e9
commit
e41127bd82
@ -161,11 +161,15 @@ class MenuHelper:
|
||||
|
||||
case "Check the pool":
|
||||
transactions = utilityHelper.loadFile("../data/transaction_pool.dat")
|
||||
if len(transactions) == 0:
|
||||
print("Transaction pool is empty")
|
||||
continue
|
||||
x = 0
|
||||
for transaction in transactions:
|
||||
x += 1
|
||||
print(f"---------------------------------------{x}-------------------------------------------")
|
||||
print(f"{transaction}")
|
||||
x += 1
|
||||
print("---------------------------------------END-------------------------------------------")
|
||||
|
||||
case "Mine a block":
|
||||
taskHelper.createBlock(self)
|
||||
@ -211,7 +215,7 @@ class MenuHelper:
|
||||
print("Wrong input, try again")
|
||||
return None
|
||||
|
||||
if choice > len(menu):
|
||||
if choice >= len(menu):
|
||||
utilityHelper.clearScreen()
|
||||
print("Wrong input, try again")
|
||||
return None
|
||||
|
Loading…
x
Reference in New Issue
Block a user