File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
crates/evm/src/executor/inspector Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ impl<DB: Database> Inspector<DB> for CoverageCollector {
2121 interpreter : & mut Interpreter ,
2222 _: & mut EVMData < ' _ , DB > ,
2323 ) -> InstructionResult {
24- // TODO(Evalir): This needs to be changed to contract.hash so it's not ultra slow.
25- let hash = b256_to_h256 ( interpreter. contract . bytecode . clone ( ) . unlock ( ) . hash_slow ( ) ) ;
24+ let hash = b256_to_h256 ( interpreter. contract . hash ) ;
2625 self . maps . entry ( hash) . or_insert_with ( || {
2726 HitMap :: new ( Bytes :: copy_from_slice (
2827 interpreter. contract . bytecode . original_bytecode_slice ( ) ,
@@ -38,8 +37,7 @@ impl<DB: Database> Inspector<DB> for CoverageCollector {
3837 interpreter : & mut Interpreter ,
3938 _: & mut EVMData < ' _ , DB > ,
4039 ) -> InstructionResult {
41- // TODO(Evalir): This needs to be changed to contract.hash so it's not ultra slow.
42- let hash = b256_to_h256 ( interpreter. contract . bytecode . clone ( ) . unlock ( ) . hash_slow ( ) ) ;
40+ let hash = b256_to_h256 ( interpreter. contract . hash ) ;
4341 self . maps . entry ( hash) . and_modify ( |map| map. hit ( interpreter. program_counter ( ) ) ) ;
4442
4543 InstructionResult :: Continue
You can’t perform that action at this time.
0 commit comments