Skip to content

Commit

Permalink
Beta 1.0
Browse files Browse the repository at this point in the history
Final alpha update
  • Loading branch information
Rohan353 committed Apr 30, 2021
1 parent 744bbf2 commit 75c96d0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 45 deletions.
36 changes: 0 additions & 36 deletions Code/flask-api-test.py

This file was deleted.

Binary file modified Code/modules/__pycache__/blockchain.cpython-38.pyc
Binary file not shown.
Binary file modified Code/obj/host_chain.pkl
Binary file not shown.
20 changes: 11 additions & 9 deletions Code/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,18 @@ def handle_client(conn, addr):

print(f'{ADDR} Disconnected')

# checks through blockchain

def blockchain_lookup():

pass
def blockchain_lookup(lookup):


# look through blockchain and return bool
for block in b.chain:
if block['identification'] == lookup:
return True


# website
'''

app = Flask(__name__)


Expand All @@ -261,7 +262,9 @@ def my_form_post():
if len(processed_text) != 8:
return render_template('errortrap2.html')

if processed_text == '22121232': # put call here
result = blockchain_lookup(processed_text)

if result == True:
return render_template('form2.html')

else:
Expand All @@ -271,11 +274,10 @@ def my_form_post():
def start_website():
app.run(debug=False, host='0.0.0.0')

'''

if __name__ == '__main__':
# website_thread = threading.Thread(target=start_website)
# website_thread.start()
website_thread = threading.Thread(target=start_website)
website_thread.start()
b = blockchain.Blockchain()

x = input('Load blockchain')
Expand Down

0 comments on commit 75c96d0

Please sign in to comment.