Merge pull request #610 from mir-protocol/feedback_591

Address some feedback on #591
This commit is contained in:
Daniel Lubarov 2022-07-17 08:23:58 -07:00 committed by GitHub
commit a9fe08a4a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.