Commit 0a148e6a authored by yann300's avatar yann300 Committed by joseph izang

remove unneeded loop

parent a12b93bc
...@@ -156,20 +156,22 @@ export class CodeManager { ...@@ -156,20 +156,22 @@ export class CodeManager {
next = codeMananger.getInstructionIndex(address, step + 1) next = codeMananger.getInstructionIndex(address, step + 1)
let values = this.traceManager.getAllStopIndexes() let values = this.traceManager.getAllStopIndexes()
values = values.filter((value) => value.address === address)
if (values) { if (values) {
for (const value of values) { for (const value of values) {
if (value.address === address) {
returnInstructionIndexes.push({ instructionIndex: this.getInstructionIndex(address, value.index), address }) returnInstructionIndexes.push({ instructionIndex: this.getInstructionIndex(address, value.index), address })
} }
} }
}
values = this.traceManager.getAllOutofGasIndexes() values = this.traceManager.getAllOutofGasIndexes()
values = values.filter((value) => value.address === address)
if (values) { if (values) {
for (const value of values) { for (const value of values) {
if (value.address === address) {
outOfGasInstructionIndexes.push({ instructionIndex: this.getInstructionIndex(address, value.index), address }) outOfGasInstructionIndexes.push({ instructionIndex: this.getInstructionIndex(address, value.index), address })
} }
} }
}
} catch (error) { } catch (error) {
return console.log(error) return console.log(error)
} }
......
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