diff --git a/consensus/core/src/hashing/sighash.rs b/consensus/core/src/hashing/sighash.rs index 05645356d..2c8006f75 100644 --- a/consensus/core/src/hashing/sighash.rs +++ b/consensus/core/src/hashing/sighash.rs @@ -48,28 +48,6 @@ pub trait SigHashReusedValues { fn payload_hash(&self, set: impl Fn() -> Hash) -> Hash; } -impl SigHashReusedValues for Arc { - fn previous_outputs_hash(&self, set: impl Fn() -> Hash) -> Hash { - self.as_ref().previous_outputs_hash(set) - } - - fn sequences_hash(&self, set: impl Fn() -> Hash) -> Hash { - self.as_ref().sequences_hash(set) - } - - fn sig_op_counts_hash(&self, set: impl Fn() -> Hash) -> Hash { - self.as_ref().sig_op_counts_hash(set) - } - - fn outputs_hash(&self, set: impl Fn() -> Hash) -> Hash { - self.as_ref().outputs_hash(set) - } - - fn payload_hash(&self, set: impl Fn() -> Hash) -> Hash { - self.as_ref().outputs_hash(set) - } -} - impl SigHashReusedValues for SigHashReusedValuesUnsync { fn previous_outputs_hash(&self, set: impl Fn() -> Hash) -> Hash { self.previous_outputs_hash.get().unwrap_or_else(|| { @@ -204,11 +182,11 @@ pub fn sig_op_counts_hash(tx: &Transaction, hash_type: SigHashType, reused_value } pub fn payload_hash(tx: &Transaction, reused_values: &impl SigHashReusedValues) -> Hash { - let hash = || { - if tx.subnetwork_id.is_native() && tx.payload.is_empty() { - return ZERO_HASH; - } + if tx.subnetwork_id.is_native() && tx.payload.is_empty() { + return ZERO_HASH; + } + let hash = || { let mut hasher = TransactionSigningHash::new(); hasher.write_var_bytes(&tx.payload); hasher.finalize() diff --git a/simpa/Cargo.toml b/simpa/Cargo.toml index bea3110e1..815edf6a6 100644 --- a/simpa/Cargo.toml +++ b/simpa/Cargo.toml @@ -40,8 +40,3 @@ tokio = { workspace = true, features = ["rt", "macros", "rt-multi-thread"] } [features] heap = ["dhat", "kaspa-alloc/heap"] semaphore-trace = ["kaspa-utils/semaphore-trace"] - -[profile.heap] -inherits = "release" -debug = true -strip = false