Skip to content

Commit

Permalink
fix forgotten usage of flatten_hints and add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
PanGan21 committed Aug 17, 2023
1 parent c254bc0 commit 9856d31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#### [0.8.6] - 2023-8-11

* refactor: combine `Program.hints` and `Program.hints_ranges` into custom collection [#1366](https://github.com/lambdaclass/cairo-vm/pull/1366)

* fix: Handle error in hint `UINT256_MUL_DIV_MOD` when divides by zero [#1367](https://github.com/lambdaclass/cairo-vm/pull/1367)

* Add HintError::SyscallError and VmErrors::HINT_ERROR_STR constant [#1357](https://github.com/lambdaclass/cairo-rs/pull/1357)
Expand Down
4 changes: 2 additions & 2 deletions vm/src/types/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub(crate) struct SharedProgramData {

#[cfg(all(feature = "arbitrary", feature = "std"))]
impl<'a> Arbitrary<'a> for SharedProgramData {
/// Create an arbitary [`SharedProgramData`] using `flatten_hints` to generate `hints` and
/// Create an arbitary [`SharedProgramData`] using `HintsCollection::new` to generate `hints` and
/// `hints_ranges`
fn arbitrary(u: &mut Unstructured<'a>) -> arbitrary::Result<Self> {
let mut data = Vec::new();
Expand All @@ -79,7 +79,7 @@ impl<'a> Arbitrary<'a> for SharedProgramData {
}

let raw_hints = BTreeMap::<usize, Vec<HintParams>>::arbitrary(u)?;
let hints_collection = Program::flatten_hints(&raw_hints, data.len())
let hints_collection = HintsCollection::new(&raw_hints, data.len())
.map_err(|_| arbitrary::Error::IncorrectFormat)?;
Ok(SharedProgramData {
data,
Expand Down

0 comments on commit 9856d31

Please sign in to comment.