Merge branch 'master' into master

This commit is contained in:
Daniel van Flymen 2018-01-24 00:02:07 -05:00 committed by GitHub
commit 1ebdb59beb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View File

@ -55,6 +55,18 @@ $ docker run --rm -p 82:5000 blockchain
$ docker run --rm -p 83:5000 blockchain
```
## Installation (C# Implementation)
1. Install a free copy of Visual Studio IDE (Community Edition):
https://www.visualstudio.com/vs/
2. Once installed, open the solution file (BlockChain.sln) using the File > Open > Project/Solution menu options within Visual Studio.
3. From within the "Solution Explorer", right click the BlockChain.Console project and select the "Set As Startup Project" option.
4. Click the "Start" button, or hit F5 to run. The program executes in a console window, and is controlled via HTTP with the same commands as the Python version.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.

View File

@ -149,9 +149,10 @@ class Blockchain:
def proof_of_work(self, last_block):
"""
Simple Proof of Work Algorithm:
- Find a number p' such that hash(pp'h) contains leading 4 zeroes, where p is the previous p'
- p is the previous proof, p' is the new proof, and h is the hash of the last block
- Find a number p' such that hash(pp') contains leading 4 zeroes
- Where p is the previous proof, and p' is the new proof
:param last_block: <dict> last Block
:return: <int>
"""