Address some feedback on #591

This commit is contained in:
Daniel Lubarov 2022-07-13 16:45:21 -07:00
parent c18d4844e7
commit ef842b03c8
2 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,7 @@ impl MemorySegmentState {
}
pub(super) fn set(&mut self, virtual_addr: usize, value: U256) {
if virtual_addr + 1 > self.content.len() {
if virtual_addr >= self.content.len() {
self.content.resize(virtual_addr + 1, U256::zero());
}
self.content[virtual_addr] = value;

View File

@ -12,6 +12,8 @@ use crate::util::trace_rows_to_poly_values;
mod memory;
pub(crate) mod state;
/// A piece of data which has been encoded using Recursive Length Prefix (RLP) serialization.
/// See https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/
pub type RlpBlob = Vec<u8>;
/// Merkle proofs are encoded using an RLP blob for each node in the path.