Mercurial > public > bitcaviar-plus
comparison 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 |
comparison
equal
deleted
inserted
replaced
3:3d83609e12a1 | 4:e7a84094bf07 |
---|---|
1 class Block: | |
2 h = str() # Block hash | |
3 header = dict() | |
4 transactions = [] | |
5 | |
6 | |
7 class Header: | |
8 version = int() | |
9 previous_block_hash = str() | |
10 merkle_root = str() | |
11 timestamp = int() | |
12 bits = int() | |
13 nonce = int() | |
14 | |
15 | |
16 class Transaction: | |
17 version = int() | |
18 inputs = [] | |
19 outputs = [] | |
20 lock_time = int() | |
21 | |
22 | |
23 class TransactionInput: | |
24 is_coinbase = False | |
25 id = str() | |
26 vout = int() | |
27 script_sig = str() | |
28 sequence = int() | |
29 | |
30 | |
31 class TransactionOutput: | |
32 value = float() | |
33 script_pub_key = str() |