Skip to content

Commit

Permalink
Merge pull request #2628 from dusk-network/merkle_root_sha3
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-seppia authored Oct 8, 2024
2 parents 410012e + c4d1d21 commit f2e0282
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node-data/src/ledger/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use std::io;
use dusk_bytes::Serializable as DuskSerializable;
use execution_core::signatures::bls;
use execution_core::transfer::Transaction as ProtocolTransaction;
use execution_core::BlsScalar;
use serde::Serialize;
use sha3::Digest;

use crate::Serializable;

Expand Down Expand Up @@ -63,7 +63,7 @@ impl Transaction {
/// ### Returns
/// An array of 32 bytes representing the hash of the transaction.
pub fn hash(&self) -> [u8; 32] {
BlsScalar::hash_to_scalar(&self.inner.to_var_bytes()[..]).to_bytes()
sha3::Sha3_256::digest(self.inner.to_var_bytes()).into()
}

/// Computes the transaction ID.
Expand Down

0 comments on commit f2e0282

Please sign in to comment.