Skip to content

Commit

Permalink
Fix proxy cov issue #167 (#186)
Browse files Browse the repository at this point in the history
Fix #167


1. For non-proxy contract, the results are the same as before and in line with expectations.

2. For proxy contract, 
2.1 It is consistent with the above when running its own instructions.
2.2 while running the instructions of impl contract, relevant coverage data will be included in the implementation contract.
  • Loading branch information
0xAWM authored Sep 4, 2023
1 parent b7b9221 commit e87f164
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/evm/middlewares/coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ impl<I, VS, S> Middleware<VS, I, S> for Coverage
if IN_DEPLOY || !EVAL_COVERAGE {
return;
}
let address = interp.contract.address;
let address = interp.contract.code_address;
let pc = interp.program_counter();
self.pc_coverage.entry(address).or_default().insert(pc);

Expand Down

0 comments on commit e87f164

Please sign in to comment.