Skip to content

Commit

Permalink
reverse bytes for witness hash
Browse files Browse the repository at this point in the history
  • Loading branch information
humblenginr committed Apr 10, 2024
1 parent 03e9971 commit 2904e94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mining/merkle_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ func (s *rollingMerkleTreeStore) calcMerkleRoot(adds []*transaction.Transaction,
var zeroHash [32]byte
s.add(zeroHash)
case witness:
s.add([32]byte(adds[i].WitnessHash()))
s.add([32]byte(utils.ReverseBytes(adds[i].WitnessHash())))
default:
s.add([32]byte(adds[i].TxHash()))
s.add([32]byte(utils.ReverseBytes(adds[i].TxHash())))
}
}

Expand Down

0 comments on commit 2904e94

Please sign in to comment.