Skip to content

Commit

Permalink
fix: Oracle output resolution (#1740)
Browse files Browse the repository at this point in the history
silly fix until we use enums for foreign call results
  • Loading branch information
vezenovm authored Jun 16, 2023
1 parent 408303b commit 90d1ad4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/nargo/src/ops/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ pub fn execute_circuit(
if foreign_call_wait_info.function == "oracle_print_impl" {
let values = &foreign_call_wait_info.inputs[0];
println!("{:?}", values[0].to_field().to_hex());
brillig
.foreign_call_results
.push(ForeignCallResult { values: foreign_call_wait_info.inputs });
brillig.foreign_call_results.push(ForeignCallResult {
values: vec![vec![foreign_call_wait_info.inputs[0][0]]],
});
} else if foreign_call_wait_info.function == "oracle_print_array_impl" {
let mut outputs_hex = Vec::new();
for value in foreign_call_wait_info.inputs.clone() {
Expand All @@ -46,9 +46,9 @@ pub fn execute_circuit(
let comma_separated_elements = outputs_hex.join(", ");
let output_witnesses_string = "[".to_owned() + &comma_separated_elements + "]";
println!("{output_witnesses_string}");
brillig
.foreign_call_results
.push(ForeignCallResult { values: foreign_call_wait_info.inputs });
brillig.foreign_call_results.push(ForeignCallResult {
values: vec![vec![foreign_call_wait_info.inputs[0][0]]],
});
}

let mut next_opcodes_for_solving = vec![Opcode::Brillig(brillig)];
Expand Down

0 comments on commit 90d1ad4

Please sign in to comment.