Skip to content

Commit 9bee750

Browse files
committed
Add comment to memory.rs change
1 parent 335e2d9 commit 9bee750

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/memory.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,12 @@ impl Memory {
141141
len: U256,
142142
data: &[u8],
143143
) -> Result<(), ExitFatal> {
144+
// Needed to pass ethereum test defined in
145+
// https://github.com/ethereum/tests/commit/17f7e7a6c64bb878c1b6af9dc8371b46c133e46d
146+
// (regardless of other inputs, a zero-length copy is defined to be a no-op).
147+
// TODO: refactor `set` and `copy_large` (see
148+
// https://github.com/rust-blockchain/evm/pull/40#discussion_r677180794)
144149
if len.is_zero() {
145-
// a zero-length copy is defined to be a no-op
146150
return Ok(());
147151
}
148152

0 commit comments

Comments
 (0)