Hands-On Bitcoin Programming with Python by Harish Kumar Garg

Hands-On Bitcoin Programming with Python by Harish Kumar Garg

Author:Harish Kumar Garg [Harish Garg]
Language: eng
Format: epub
Tags: COM051360 - COMPUTERS / Programming Languages / Python, COM083000 - COMPUTERS / Security / Cryptography, COM060180 - COMPUTERS / Web / Web Services and APIs
Publisher: Packt Publishing
Published: 2018-08-29T11:28:50+00:00


Now lets get some information about this block. For example, the block fee, block size, and block transactions can be obtained by using fee, size, and transactions properties respectively on the block object created, as shown in the following code:

#!/usr/bin/env python

# import blockchain library

from blockchain import blockexplorer

# get a particular block

block = blockexplorer.get_block('0000000000000000002e90b284607359f3415647626447643b9b880ee00e41fa')

print("Block Fee: %s\n" % block.fee)

print("Block size: %s\n" % block.size)

print("Block transactions: %s\n" % block.transactions)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.