Rework ch03 for most recent version of Bitcoin Core

This commit is contained in:
MarcoFalke
2017-10-19 22:38:27 +02:00
parent 929fe5c08e
commit fa6ee0557e
3 changed files with 109 additions and 139 deletions

View File

@@ -3,8 +3,8 @@ from bitcoin.rpc import RawProxy
# Create a connection to local Bitcoin Core node
p = RawProxy()
# Run the getinfo command, store the resulting data in info
info = p.getinfo()
# Run the getblockchaininfo command, store the resulting data in info
info = p.getblockchaininfo()
# Retrieve the 'blocks' element from the info
print(info['blocks'])