Commit dad20bcd931c58c818df618d3d2a5807bdea36f8
get balance should read the state from root
wanderer committed on 11/11/2016, 3:03:26 PMParent: 439177b212e72f0e65ae91c034b8d4d8c9c85d9a
Files changed
EVMinterface.js | changed |
EVMinterface.js | ||
---|---|---|
@@ -124,9 +124,9 @@ | ||
124 | 124 | getBalance (addressOffset, offset, cbIndex) { |
125 | 125 | this.takeGas(20) |
126 | 126 | |
127 | 127 | const path = [...this.getMemory(addressOffset, ADDRESS_SIZE_BYTES), 'balance'] |
128 | - const opPromise = this.kernel.environment.state.get(path) | |
128 | + const opPromise = this.kernel.environment.state.root.get(path) | |
129 | 129 | .then(vertex => new U256(vertex.value)) |
130 | 130 | .catch(() => new U256(0)) |
131 | 131 | |
132 | 132 | this.kernel.pushOpsQueue(opPromise, cbIndex, balance => { |
Built with git-ssb-web