git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 953c34e7f7eb6e1ff41fa8f1cd161a1f62909b34

Interface: change internal getBalance to work with U256 and not ArrayBuffer

Alex Beregszaszi committed on 8/17/2016, 12:53:57 AM
Parent: de2486f29ec9def6a646f6caeaf4ab72cf4f7fdb

Files changed

interface.jschanged
interface.jsView
@@ -94,9 +94,9 @@
9494 balance (addressOffset, offset) {
9595 const address = new Address(this.getMemory(addressOffset, constants.ADDRESS_SIZE_BYTES))
9696 // call the parent contract and ask for the balance of one of its child contracts
9797 const balance = this.environment.parent.environment.getBalance(address)
98- this.setMemory(offset, constants.BALANCE_SIZE_BYTES, balance)
98+ this.setMemory(offset, constants.BALANCE_SIZE_BYTES, balance.toBuffer(constants.BALANCE_SIZE_BYTES))
9999 }
100100
101101 /**
102102 * Gets the execution's origination address and loads it into memory at the

Built with git-ssb-web