Skip to content

Commit

Permalink
fixup! [prng] avoid using core::mem:size_of
Browse files Browse the repository at this point in the history
  • Loading branch information
jayz22 committed Sep 13, 2023
1 parent cd0f345 commit 4897658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion soroban-env-host/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3032,7 +3032,7 @@ impl VmCallerEnv for Host {
) -> Result<Void, Self::Error> {
self.visit_obj(seed, |bytes: &ScBytes| {
let slice: &[u8] = bytes.as_ref();
self.charge_budget(ContractCostType::HostMemCpy, Some(prng::SEED_BYTES as u64))?;
self.charge_budget(ContractCostType::HostMemCpy, Some(prng::SEED_BYTES))?;
if let Ok(seed32) = slice.try_into() {
self.with_current_prng(|prng| {
*prng = Prng::new_from_seed(seed32);
Expand Down

0 comments on commit 4897658

Please sign in to comment.