Commit 72e1b875 authored by yann300's avatar yann300

remove uneeded function

parent 0958b7eb
......@@ -133,7 +133,11 @@ web3VmProvider.prototype.pushTrace = function (self, data) {
}
if (traceHelper.isSHA3Instruction(step)) {
var sha3Input = getSha3Input(step.stack, step.memory)
pushSha3Preimage(this, sha3Input)
var preimage = sha3Input
var imageHash = ethutil.sha3('0x' + sha3Input).toString('hex')
self.sha3Preimages[imageHash] = {
'preimage': preimage
}
}
this.processingIndex++
this.previousDepth = depth
......@@ -201,14 +205,6 @@ web3VmProvider.prototype.preimage = function (hashedKey, cb) {
cb(null, this.sha3Preimages[hashedKey] !== undefined ? this.sha3Preimages[hashedKey].preimage : null)
}
function pushSha3Preimage (self, sha3Input) {
var preimage = sha3Input
var imageHash = ethutil.sha3('0x' + sha3Input).toString('hex')
self.sha3Preimages[imageHash] = {
'preimage': preimage
}
}
function getSha3Input (stack, memory) {
var memoryStart = stack[stack.length - 1]
var memoryLength = stack[stack.length - 2]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment