Skip to content

Commit

Permalink
fix: witness merkle root
Browse files Browse the repository at this point in the history
  • Loading branch information
Nesopie committed Mar 25, 2024
1 parent af28d53 commit 2464bc1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/features/block/mine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ export const mine = (
const witnessMerkleRootHash = reversify(
merkleRoot([
ZEROS, //zeros are for the coinbase transaction
...txs.map((tx) =>
reversify(sha256(sha256(txSerializer(tx).serializedWTx)))
),
...txs.map((tx) => sha256(sha256(txSerializer(tx).serializedWTx))),
])
);
const commitmentHash = sha256(sha256(witnessMerkleRootHash + ZEROS));
Expand Down

0 comments on commit 2464bc1

Please sign in to comment.