From cd5a669f3badbf941ac937ec878c79e25a2a8965 Mon Sep 17 00:00:00 2001 From: Sudarshan-21 Date: Wed, 1 May 2024 04:59:07 +0530 Subject: [PATCH] witness commitment resolved --- main.py | 2 +- output.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index c1469550..33ff9d15 100644 --- a/main.py +++ b/main.py @@ -358,7 +358,7 @@ def compute_witness_commitment(witness_root_hash): sha256d_hash = hashlib.sha256(sha256_hash).digest() # Derive the wTXID commitment (hexadecimal representation) - wtxid_commitment = sha256d_hash.hex() # Reverse bytes for little-endian + wtxid_commitment = sha256d_hash[::-1].hex() # Reverse bytes for little-endian return wtxid_commitment diff --git a/output.txt b/output.txt index 0a40fa79..f2abe350 100644 --- a/output.txt +++ b/output.txt @@ -1,6 +1,6 @@ -0000000400000000000000000000000000000000000000000000000000000000000000001896b945298ae8497eca50ed2fa90673a2d67eb085a7f88f422dac2fc5dd15a1e77d3166ffff001fe1bc0100 -020000000001010000000000000000000000000000000000000000000000000000000000000000010000000d03951a0610076c0000946e0100000000000200000000000000001976a914acd783f632ad040fc72d9a06ec17ffb2d8a97a5d88ac0000000000000000266a24aa21a9ed1ef5192773bb609ffbddfcb41c128963d584af8e9cc2fab9f1c756cf3724e74a0120000000000000000000000000000000000000000000000000000000000000000000000000 -f3c3f2851497e2c193422533fdc36689701a89f567d15046c3fe9f5f3afa0513 +000000040000000000000000000000000000000000000000000000000000000000000000392ae3d4938a9c9709af2440f2705a2ce8e84b32b9c22f186022a69b3cfb46ccb27e3166ffff001fd8040000 +020000000001010000000000000000000000000000000000000000000000000000000000000000010000000d03951a0610076c0000946e0100000000000200000000000000001976a914acd783f632ad040fc72d9a06ec17ffb2d8a97a5d88ac0000000000000000266a24aa21a9ed4ae72437cf56c7f1b9fac29c8eaf84d56389121cb4fcddfb9f60bb732719f51e0120000000000000000000000000000000000000000000000000000000000000000000000000 +8ec2128535e6b2c8279b7c73aae5cb8467e8ccae986ab0d9a771098f7834cfa3 25ce6b8d39d02471c43a804569a72015e81f3400170c1b8f5418e6938cd60b74 34845a0f5eca756d7768ee2f03186ec4d73d86f9ebeaaf96abddf8bb733641b6 93bba324688af65b727f0c9c08f0fb45e2a2389b269939b1414f4818b071c598