Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek committed Aug 16, 2023
1 parent 9c22c04 commit d710e06
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fvm/src/kernel/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,9 +759,11 @@ fn draw_randomness(
state.write_all(rbase)?;
state.write_i64::<byteorder::BigEndian>(round)?;
state.write_all(entropy)?;
let mut ret = [0u8; 32];
ret.clone_from_slice(state.finalize().as_bytes());
Ok(ret)
state
.finalize()
.as_bytes()
.try_into()
.map_err(anyhow::Error::from)
}

impl<C> RandomnessOps for DefaultKernel<C>
Expand Down

0 comments on commit d710e06

Please sign in to comment.