Update testrpc, vm, and re-patch

uport
cgewecke 8 years ago
parent b8e5afe577
commit b3f88710ea
  1. 14
      hookIntoEvents.patch
  2. 2
      package.json

@ -1,5 +1,5 @@
--- opFns.js.orig 2016-07-04 17:29:54.000000000 +0100 --- opFns.js.orig 2016-12-19 15:10:12.000000000 -0800
+++ opFns.js 2016-09-30 12:30:33.000000000 +0100 +++ opFns.js 2016-12-19 15:15:51.000000000 -0800
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
const logTable = require('./logTable.js') const logTable = require('./logTable.js')
const ERROR = constants.ERROR const ERROR = constants.ERROR
@ -8,23 +8,23 @@
// the opcode functions // the opcode functions
module.exports = { module.exports = {
@@ -499,7 +500,6 @@ @@ -489,7 +490,7 @@
memLength = utils.bufferToInt(memLength) memLength = utils.bufferToInt(memLength)
const numOfTopics = runState.opCode - 0xa0 const numOfTopics = runState.opCode - 0xa0
const mem = memLoad(runState, memOffset, memLength) const mem = memLoad(runState, memOffset, memLength)
- subGas(runState, new BN(numOfTopics * fees.logTopicGas.v + memLength * fees.logDataGas.v)) - subGas(runState, new BN(numOfTopics * fees.logTopicGas.v + memLength * fees.logDataGas.v))
+ //subGas(runState, new BN(numOfTopics * fees.logTopicGas.v + memLength * fees.logDataGas.v))
// add address // add address
var log = [runState.address] var log = [runState.address]
@@ -507,6 +507,12 @@ @@ -497,6 +498,11 @@
// add data // add data
log.push(mem) log.push(mem)
+ //Added to allow tracking of instrumentation even for .call() and throw
+ var toWrite = {}; + var toWrite = {};
+ toWrite.address= log[0].toString('hex'); + toWrite.address= log[0].toString('hex')
+ toWrite.topics = log[1].map(function(x){return x.toString('hex')}) + toWrite.topics = log[1].map(function(x){return x.toString('hex')})
+ toWrite.data = log[2].toString('hex'); + toWrite.data = log[2].toString('hex')
+ fs.appendFileSync('./allFiredEvents', JSON.stringify(toWrite) + '\n') + fs.appendFileSync('./allFiredEvents', JSON.stringify(toWrite) + '\n')
runState.logs.push(log) runState.logs.push(log)
}, },

@ -12,7 +12,7 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"ethereumjs-testrpc": "^2.2.7", "ethereumjs-testrpc": "^3.0.3",
"istanbul": "^0.4.5", "istanbul": "^0.4.5",
"shelljs": "^0.7.4", "shelljs": "^0.7.4",
"solidity-parser": "git+https://github.com/ConsenSys/solidity-parser.git#master" "solidity-parser": "git+https://github.com/ConsenSys/solidity-parser.git#master"

Loading…
Cancel
Save