From 1da0356c422e5117442cfddb9374dd23a5305d2d Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 21 Oct 2019 13:57:31 +0100 Subject: [PATCH] Even better... --- lib/collector.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/collector.js b/lib/collector.js index 2f0315b..1495542 100644 --- a/lib/collector.js +++ b/lib/collector.js @@ -1,5 +1,5 @@ const web3Utils = require('web3-utils') - +const limit = web3Utils.toBN(2).pow(web3Utils.toBN(236)) /** * Writes data from the VM step to the in-memory * coverage map constructed by the Instrumenter. @@ -22,6 +22,7 @@ class DataCollector { try { if (this.validOpcodes[info.opcode.name] && info.stack.length > 0){ const idx = info.stack.length - 1; + if (info.stack[idx].lt(limit)) return; let hash = "0x" + info.stack[idx].toString(16,64); if(this.instrumentationData[hash]){ this.instrumentationData[hash].hits++;