diff --git a/pybtc/__init__.py b/pybtc/__init__.py index 4987c0f..4c5a1c4 100644 --- a/pybtc/__init__.py +++ b/pybtc/__init__.py @@ -1,6 +1,6 @@ -# from .tools import * -# from .opcodes import * +from .tools import * +from .opcodes import * from .consensus import * -from .blockchain import * +from .transaction import * version = "2.0.1" diff --git a/pybtc/blockchain.py b/pybtc/blockchain.py index 7a49756..c52f211 100644 --- a/pybtc/blockchain.py +++ b/pybtc/blockchain.py @@ -12,7 +12,7 @@ k = 0 -class Transaction(): +class OLDTransaction(): def __init__(self, version = 1, tx_in = [], tx_out = [] , lock_time = 0, hash=None, size = 0, timestamp = None, marker = None, flag = None, witness = [], @@ -410,7 +410,7 @@ class Transaction(): witness = witness, whash = wtx_id, vsize = vsize) -class Block(): +class OLDBlock(): def __init__(self, version, prev_block, merkle_root, timestamp, bits, nonce, txs, block_size, hash = None, header = None): qt = time.time() diff --git a/pybtc/transaction.py b/pybtc/transaction.py index 238d4f6..ba6e3d8 100644 --- a/pybtc/transaction.py +++ b/pybtc/transaction.py @@ -42,13 +42,13 @@ class Transaction(dict): for k in range(ic): self["vIn"][k] = dict() self["vIn"][k]["txId"] = stream.read(32) - (self["vIn"][k]["vOut"],) = unpack('