fix: coverage count

Instead of full match, start to count as soon
as there is 1 match
This commit is contained in:
Anthony Laibe 2018-11-16 14:35:39 +00:00
parent c66fe695f0
commit f32ddc9935

View File

@ -281,10 +281,10 @@ class ContractSource {
// Try to match the contract to the bytecode. If it doesn't,
// then we bail.
contractMatches = trace.structLogs.every((step) => bytecode[step.pc]);
contractMatches = trace.structLogs.filter((step) => bytecode[step.pc]);
if(!contractMatches) continue;
trace.structLogs.forEach((step) => {
contractMatches.forEach((step) => {
step = bytecode[step.pc];
if(!step.sourceMap || step.sourceMap === '' || step.sourceMap === SourceMap.empty()) return;
const sourceMapString = step.sourceMap.toString(this.id);