Mercurial > public > bitcaviar-plus
view src/block_structure.py @ 4:e7a84094bf07
refactor code
author | Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com> |
---|---|
date | Wed, 20 Oct 2021 19:36:39 +0200 |
parents | |
children | 1a8d94b500d8 |
line wrap: on
line source
class Block: h = str() # Block hash header = dict() transactions = [] class Header: version = int() previous_block_hash = str() merkle_root = str() timestamp = int() bits = int() nonce = int() class Transaction: version = int() inputs = [] outputs = [] lock_time = int() class TransactionInput: is_coinbase = False id = str() vout = int() script_sig = str() sequence = int() class TransactionOutput: value = float() script_pub_key = str()