diff 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 diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/block_structure.py	Wed Oct 20 19:36:39 2021 +0200
@@ -0,0 +1,33 @@
+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()
\ No newline at end of file