Fix #8: The received difficulty doesn't match the claimed one!

This commit is contained in:
Benjamin Loison 2023-06-03 16:39:31 +02:00
parent 848b52e3a6
commit 0ab5395508
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8
2 changed files with 3 additions and 2 deletions

View File

@ -40,5 +40,5 @@ while True:
write(verifier, 'entries.txt')
result = ' '.join(getProgramLine(verifier).split()[1:])
print(result)
if not result.startswith('Verified'):
if result.startswith('The received difficulty'):#not result.startswith('Verified'):
break

View File

@ -33,7 +33,8 @@ indexesRequest = set() if len(sys.argv) <= 3 else ast.literal_eval(sys.argv[3])
if indexesRequest == set():
while len(indexesRequest) < common.NUMBER_OF_ENTRIES_TO_VERIFY:
index = secrets.randbelow(common.ENTRIES_NUMBER)
indexesRequest.add(index)
if not common.otherIndex(index) in indexesRequest:
indexesRequest.add(index)
indexesRequestFilePath = 'indexesRequest.txt'