|
|
|
@ -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++; |
|
|
|
|