Skip to content

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan353 committed Apr 29, 2021
1 parent 8c3e900 commit 744bbf2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Code/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@


def disconnect_net():
socket.close()
sys.exit(1)
sys.exit()

# put query responses here

Expand Down
Binary file modified Code/modules/__pycache__/blockchain.cpython-38.pyc
Binary file not shown.
8 changes: 4 additions & 4 deletions Code/modules/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

# Difficulty Setting (which hashes are accepted for Proof of Work)

correct = ['000001', '000002', '000003', '000004']
#correct = ['00']
#correct = ['000001', '000002', '000003', '000004']
correct = ['000']


class Blockchain():
Expand All @@ -34,7 +34,7 @@ def check_chain(self, chain):

hash = self.hash(block)

if hash[0:2] not in correct:
if hash[0:3] not in correct:
valid = False

break
Expand Down Expand Up @@ -107,7 +107,7 @@ def mine(self, block):

hash = self.hash(block)

if hash[0:2] in correct:
if hash[0:3] in correct:
found = True

attempt += 1
Expand Down
Binary file modified Code/modules/pki/__pycache__/pki.cpython-38.pyc
Binary file not shown.
Binary file modified Code/obj/host_chain.pkl
Binary file not shown.

0 comments on commit 744bbf2

Please sign in to comment.