git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit dad20bcd931c58c818df618d3d2a5807bdea36f8

get balance should read the state from root

wanderer committed on 11/11/2016, 3:03:26 PM
Parent: 439177b212e72f0e65ae91c034b8d4d8c9c85d9a

Files changed

EVMinterface.jschanged
EVMinterface.jsView
@@ -124,9 +124,9 @@
124124 getBalance (addressOffset, offset, cbIndex) {
125125 this.takeGas(20)
126126
127127 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)
129129 .then(vertex => new U256(vertex.value))
130130 .catch(() => new U256(0))
131131
132132 this.kernel.pushOpsQueue(opPromise, cbIndex, balance => {

Built with git-ssb-web