Commit a7906e630711381a660b28d085f0008dc40774fe
remove reverts
wanderer committed on 6/2/2017, 7:40:04 PMParent: dee5ab84ac49442b22f614eaf5a76c873d572941
Files changed
exoInterface.js | changed |
package.json | changed |
exoInterface.js | ||
---|---|---|
@@ -1,6 +1,4 @@ | ||
1 | -const clearObject = require('object-clear') | |
2 | -const clone = require('clone') | |
3 | 1 | const EventEmitter = require('events') |
4 | 2 | const PortManager = require('./portManager.js') |
5 | 3 | const Message = require('primea-message') |
6 | 4 | |
@@ -88,17 +86,12 @@ | ||
88 | 86 | * to by the VM to retrive infromation from the Environment. |
89 | 87 | * @returns {Promise} |
90 | 88 | */ |
91 | 89 | async run (message) { |
92 | - const oldState = clone(this.state, false, 3) | |
93 | 90 | let result |
94 | 91 | try { |
95 | 92 | result = await this.container.run(message) || {} |
96 | 93 | } catch (e) { |
97 | - // revert the state | |
98 | - clearObject(this.state) | |
99 | - Object.assign(this.state, oldState) | |
100 | - | |
101 | 94 | result = { |
102 | 95 | exception: true, |
103 | 96 | exceptionError: e |
104 | 97 | } |
package.json | ||
---|---|---|
@@ -30,12 +30,10 @@ | ||
30 | 30 | "contributors": "Alex Beregszaszi <alex@rtfs.hu>", |
31 | 31 | "license": "MPL-2.0", |
32 | 32 | "dependencies": { |
33 | 33 | "bn.js": "^4.11.6", |
34 | - "clone": "^2.1.1", | |
35 | 34 | "events": "^1.1.1", |
36 | - "ipld-graph-builder": "1.1.5", | |
37 | - "object-clear": "^0.1.0" | |
35 | + "ipld-graph-builder": "1.1.5" | |
38 | 36 | }, |
39 | 37 | "devDependencies": { |
40 | 38 | "coveralls": "^2.13.1", |
41 | 39 | "documentation": "^4.0.0-rc.1", |
Built with git-ssb-web