blockchain
blockchain copied to clipboard
Exception when sending mine request
I get following Exception in my terminal when executing the mine request:
Exception happened during processing of request from ('127.0.0.1', 57087) Traceback (most recent call last): File "/Users/chris/anaconda/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock self.process_request(request, client_address) File "/Users/chris/anaconda/lib/python3.5/socketserver.py", line 341, in process_request self.finish_request(request, client_address) File "/Users/chris/anaconda/lib/python3.5/socketserver.py", line 354, in finish_request self.RequestHandlerClass(request, client_address, self) File "/Users/chris/anaconda/lib/python3.5/socketserver.py", line 681, in __init__ self.handle() File "/Users/chris/anaconda/lib/python3.5/site-packages/werkzeug/serving.py", line 293, in handle rv = BaseHTTPRequestHandler.handle(self) File "/Users/chris/anaconda/lib/python3.5/http/server.py", line 422, in handle self.handle_one_request() File "/Users/chris/anaconda/lib/python3.5/site-packages/werkzeug/serving.py", line 328, in handle_one_request return self.run_wsgi() File "/Users/chris/anaconda/lib/python3.5/site-packages/werkzeug/serving.py", line 270, in run_wsgi execute(self.server.app) File "/Users/chris/anaconda/lib/python3.5/site-packages/werkzeug/serving.py", line 258, in execute application_iter = app(environ, start_response) File "/Users/chris/anaconda/lib/python3.5/site-packages/flask/app.py", line 1997, in __call__ return self.wsgi_app(environ, start_response) File "/Users/chris/anaconda/lib/python3.5/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/Users/chris/anaconda/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/Users/chris/anaconda/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "blockchain.py", line 208, in mine proof = blockchain.proof_of_work(last_block) File "blockchain.py", line 172, in proof_of_work while self.valid_proof(last_proof, proof, last_hash) is False: File "blockchain.py", line 189, in valid_proof guess = '{last_proof}{proof}{last_hash}'.encode()
I figured it out. I will open a pull request