Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
erelsgl committed Jul 14, 2019
2 parents f091d5a + 3855e47 commit 63e8888
Show file tree
Hide file tree
Showing 30 changed files with 34 additions and 2 deletions.
Binary file modified 1. Introduction/1. Questions.docx
Binary file not shown.
Binary file added 1. Introduction/1. Questions.pdf
Binary file not shown.
Binary file modified 1. Introduction/Bitcoin - Introduction.docx
Binary file not shown.
Binary file added 1. Introduction/Bitcoin - Introduction.pdf
Binary file not shown.
Binary file modified 2. How Bitcoin Works/2. Questions.docx
Binary file not shown.
Binary file added 2. How Bitcoin Works/2. Questions.pdf
Binary file not shown.
Binary file modified 2. How Bitcoin Works/How Bitcoin Works.docx
Binary file not shown.
Binary file added 2. How Bitcoin Works/How Bitcoin Works.pdf
Binary file not shown.
Binary file added 3. Bitcoin Core/3. Questions.docx
Binary file not shown.
Binary file added 3. Bitcoin Core/3. Questions.pdf
Binary file not shown.
Binary file modified 3. Bitcoin Core/bitcoin development environment.docx
Binary file not shown.
Binary file not shown.
32 changes: 32 additions & 0 deletions 3. Bitcoin Core/daemonCommands.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import os
import subprocess
import time
import re

os.system(r"bitcoind -daemon")
time.sleep(9)

cmd = ['bitcoin-cli', 'getblockchaininfo']
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

output = proc.communicate()[0].decode('ascii') # all blockchaininfo as a string

os.system(r"bitcoin-cli stop")


try:
blocks = re.search('"blocks": (.+?),\n', output).group(1)
except AttributeError:
# not found in the output
blocks = 'not found any blocks' # apply your error handling

try:
diff = re.search('"difficulty": (.+?),\n', output).group(1)
except AttributeError:
# not found in the output
diff = 'not found any difficulty' # apply your error handling



print("blobks:",blocks)
print("difficulty:",diff)
Binary file added 4. Keys, Addresses/4. Questions.pdf
Binary file not shown.
Binary file added 4. Keys, Addresses/Keys, Addresses.pdf
Binary file not shown.
Binary file removed 4. Keys, Addresses/Question.docx
Binary file not shown.
Binary file modified 5. Wallets/5. Questions.docx
Binary file not shown.
Binary file added 5. Wallets/5. Questions.pdf
Binary file not shown.
Binary file modified 5. Wallets/Wallets.docx
Binary file not shown.
Binary file added 5. Wallets/Wallets.pdf
Binary file not shown.
Binary file added 5. Wallets/~$ Questions.docx
Binary file not shown.
Binary file added 6. Transactions/6. Questions.docx
Binary file not shown.
Binary file added 6. Transactions/6. Questions.pdf
Binary file not shown.
Binary file modified 6. Transactions/Transactions.docx
Binary file not shown.
Binary file added 6. Transactions/Transactions.pdf
Binary file not shown.
Binary file added 7. Advanced Tx and Scripting/7. Questions.docx
Binary file not shown.
Binary file added 7. Advanced Tx and Scripting/7. Questions.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Base on "Mastering Bitcoin" - by Andreas M. Antonopoulos, O'REILLY.

<img src="https://github.com/yoavhenig/BitcoinReading/blob/master/1.%20Introduction/Mastering%20Bitcoin%20book.JPG" width="200">

https://unglueit-files.s3.amazonaws.com/ebf/05db7df4f31840f0a873d6ea14dcc28d.pdf
<br />https://www.oreilly.com/library/view/mastering-bitcoin/9781491902639/cover.html or
<br />https://unglueit-files.s3.amazonaws.com/ebf/05db7df4f31840f0a873d6ea14dcc28d.pdf (old version in pdf)

Supervisor: Dr. Erel Segal Halevi

Expand Down

0 comments on commit 63e8888

Please sign in to comment.