Merge branch 'master' into master
This commit is contained in:
commit
1ebdb59beb
12
README.md
12
README.md
|
@ -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.
|
||||
|
|
|
@ -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>
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue