Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FredCoen committed Dec 31, 2024
1 parent ebb9cd2 commit 5197a14
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions crates/interpreter/src/interpreter/ext_bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl ExtBytecode {
}

pub fn hash(&mut self) -> Option<B256> {
self.bytecode_hash
self.bytecode_hash
}
}

Expand Down Expand Up @@ -186,17 +186,6 @@ mod tests {
use super::*;
use primitives::Bytes;

#[test]
fn test_hash_caching() {
let bytecode = Bytecode::new_raw(Bytes::new());
let mut ext_bytecode = ExtBytecode::new(bytecode.clone());
assert_eq!(ext_bytecode.bytecode_hash, None);

let hash = ext_bytecode.hash();
assert_eq!(hash, bytecode.hash_slow());
assert_eq!(ext_bytecode.bytecode_hash, Some(bytecode.hash_slow()));
}

#[test]
fn test_with_hash_constructor() {
let bytecode = Bytecode::new_raw(Bytes::from(&[0x60, 0x00][..]));
Expand Down

0 comments on commit 5197a14

Please sign in to comment.