cosme12 / SimpleCoin

Just a really simple, insecure and incomplete implementation of a blockchain for a cryptocurrency made in Python as educational material. In other words, a simple Bitcoin clone.
http://copitosystem.com
MIT License
1.78k stars 397 forks source link

miner.py doesn't work... #31

Closed jianchengss closed 4 years ago

jianchengss commented 6 years ago

I got http code 500 when I run miner.py :

 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2018-02-24 17:17:18,787] ERROR in app: Exception on /txion [GET]
Traceback (most recent call last):
  File "/home/jason/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/jason/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1615, in full_dispatch_request
    return self.finalize_request(rv)
  File "/home/jason/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1630, in finalize_request
    response = self.make_response(rv)
  File "/home/jason/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1725, in make_response
    raise ValueError('View function did not return a response')
ValueError: View function did not return a response
127.0.0.1 - - [24/Feb/2018 17:17:18] "GET /txion?update=dgBVRxwlanhdodHYanSctJDj72G3f1Uen+4tpkjSfQdSSJwKLHjyu90VeEPrh7S9aMgScguyJlDwyJCv1RBo7g== HTTP/1.1" 500 -
cosme12 commented 6 years ago

You should try now after all this changes.

ppsirg commented 6 years ago

some keys crash flask url pre-processing, so i added the function allowed_characters https://github.com/ppsirg/SimpleCoin/blob/84938621a261fbed7f8273f06d5389efa271bd88/simpleCoin/wallet.py#L91

and implemented here on keys generation https://github.com/ppsirg/SimpleCoin/blob/84938621a261fbed7f8273f06d5389efa271bd88/simpleCoin/wallet.py#L106

if you want guys, i can pull request this to addresses generation

cosme12 commented 4 years ago

This has been fixed in #56.