Skip to content

Commit

Permalink
fix: include all inputs in inputs vector for Sha256Compression
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Mar 2, 2024
1 parent d9c244f commit 74b870c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions acvm-repo/acir/src/circuit/opcodes/black_box_function_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,10 @@ impl BlackBoxFuncCall {
| BlackBoxFuncCall::PedersenCommitment { inputs, .. }
| BlackBoxFuncCall::PedersenHash { inputs, .. }
| BlackBoxFuncCall::BigIntFromLeBytes { inputs, .. }
| BlackBoxFuncCall::Poseidon2Permutation { inputs, .. }
| BlackBoxFuncCall::Sha256Compression { inputs, .. } => inputs.to_vec(),
| BlackBoxFuncCall::Poseidon2Permutation { inputs, .. } => inputs.to_vec(),
BlackBoxFuncCall::Sha256Compression { inputs, hash_values, .. } => {
inputs.iter().chain(hash_values).copied().collect()
}
BlackBoxFuncCall::AND { lhs, rhs, .. } | BlackBoxFuncCall::XOR { lhs, rhs, .. } => {
vec![*lhs, *rhs]
}
Expand Down

0 comments on commit 74b870c

Please sign in to comment.