Monero: fix signature hash for V1 txs (#598)

* fix signature hash for V1 txs

* fix CI
This commit is contained in:
Boog900
2024-08-24 00:34:54 +00:00
committed by GitHub
parent a2df54dd6a
commit 394db44b30
2 changed files with 3 additions and 3 deletions

View File

@@ -554,11 +554,11 @@ impl Transaction<NotPruned> {
/// This returns None if the transaction is without signatures.
pub fn signature_hash(&self) -> Option<[u8; 32]> {
Some(match self {
Transaction::V1 { prefix, signatures } => {
Transaction::V1 { prefix, .. } => {
if (prefix.inputs.len() == 1) && matches!(prefix.inputs[0], Input::Gen(_)) {
None?;
}
self.hash_with_prunable_hash(PrunableHash::V1(signatures))
self.hash_with_prunable_hash(PrunableHash::V1(&[]))
}
Transaction::V2 { proofs, .. } => self.hash_with_prunable_hash({
let Some(proofs) = proofs else { None? };