From 2e0b7992cc8585cf64348d87bf46baf7294db56c Mon Sep 17 00:00:00 2001 From: Nicholas Ward Date: Mon, 20 Mar 2023 15:03:19 -0700 Subject: [PATCH] addressed comments --- evm/src/util.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/evm/src/util.rs b/evm/src/util.rs index 8f2c4e96..fb0700c3 100644 --- a/evm/src/util.rs +++ b/evm/src/util.rs @@ -164,7 +164,7 @@ pub(crate) fn mem_vec_to_biguint(x: &[U256]) -> BigUint { le_limbs_to_biguint(&x.iter().map(|&n| n.try_into().unwrap()).collect_vec()) } -pub(crate) fn biguint_to_le_limbs(x: BigUint) -> Vec { +pub(crate) fn biguint_to_mem_vec(x: BigUint) -> Vec { let mut digits = x.to_u32_digits(); // Pad to a multiple of 4. @@ -173,12 +173,6 @@ pub(crate) fn biguint_to_le_limbs(x: BigUint) -> Vec { digits .chunks(4) .map(|c| (c[3] as u128) << 96 | (c[2] as u128) << 64 | (c[1] as u128) << 32 | c[0] as u128) - .collect() -} - -pub(crate) fn biguint_to_mem_vec(x: BigUint) -> Vec { - biguint_to_le_limbs(x) - .into_iter() .map(|n| n.into()) .collect() }