Skip to content

Commit

Permalink
witness commitment resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Sudarshan-21 committed Apr 30, 2024
1 parent 4fddc27 commit cd5a669
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions output.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
0000000400000000000000000000000000000000000000000000000000000000000000001896b945298ae8497eca50ed2fa90673a2d67eb085a7f88f422dac2fc5dd15a1e77d3166ffff001fe1bc0100
020000000001010000000000000000000000000000000000000000000000000000000000000000010000000d03951a0610076c0000946e0100000000000200000000000000001976a914acd783f632ad040fc72d9a06ec17ffb2d8a97a5d88ac0000000000000000266a24aa21a9ed1ef5192773bb609ffbddfcb41c128963d584af8e9cc2fab9f1c756cf3724e74a0120000000000000000000000000000000000000000000000000000000000000000000000000
f3c3f2851497e2c193422533fdc36689701a89f567d15046c3fe9f5f3afa0513
000000040000000000000000000000000000000000000000000000000000000000000000392ae3d4938a9c9709af2440f2705a2ce8e84b32b9c22f186022a69b3cfb46ccb27e3166ffff001fd8040000
020000000001010000000000000000000000000000000000000000000000000000000000000000010000000d03951a0610076c0000946e0100000000000200000000000000001976a914acd783f632ad040fc72d9a06ec17ffb2d8a97a5d88ac0000000000000000266a24aa21a9ed4ae72437cf56c7f1b9fac29c8eaf84d56389121cb4fcddfb9f60bb732719f51e0120000000000000000000000000000000000000000000000000000000000000000000000000
8ec2128535e6b2c8279b7c73aae5cb8467e8ccae986ab0d9a771098f7834cfa3
25ce6b8d39d02471c43a804569a72015e81f3400170c1b8f5418e6938cd60b74
34845a0f5eca756d7768ee2f03186ec4d73d86f9ebeaaf96abddf8bb733641b6
93bba324688af65b727f0c9c08f0fb45e2a2389b269939b1414f4818b071c598
Expand Down

0 comments on commit cd5a669

Please sign in to comment.