diff --git a/src/main.py b/src/main.py index 3cbd532..3ed909f 100644 --- a/src/main.py +++ b/src/main.py @@ -30,15 +30,14 @@ def parse_arguments(): # TODO pokracovani - transaction_hashes = [calculate_txid(COINBASE_TRANSACTION)] + [calculate_txid(json_transaction) for json_transaction in mempool.valid_transactions] + block_transactions = [COINBASE_TRANSACTION] + mempool.valid_transactions + + transaction_hashes = [calculate_txid(COINBASE_TRANSACTION)] + [calculate_txid(json_transaction) for json_transaction in block_transactions[1:]] block_hash = block_mining(transaction_hashes).hex() - #wtxids = ["0000000000000000000000000000000000000000000000000000000000000000"] + transaction_hashes[1:] - #wtxids = ["0000000000000000000000000000000000000000000000000000000000000000"] + transaction_hashes - wtxids = transaction_hashes - - witness_commitment = calculate_witness_commitment(wtxids) + wtxids = ["0000000000000000000000000000000000000000000000000000000000000000"] + transaction_hashes[1:] + witness_commitment = calculate_witness_commitment(wtxids) scriptpubkey_wc = '6a24aa21a9ed' + witness_commitment COINBASE_TRANSACTION["vout"][1]["scriptpubkey"] = scriptpubkey_wc