git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit ac1ad6aee9837a02e6e35adcddd65518522cdbd6

check if to is undefined

wanderer committed on 3/24/2017, 1:11:58 AM
Parent: e15a0e55ac98a4fccb6cf5af8247ff7d1123d0a7

Files changed

EVMinterface.jschanged
common.jschanged
defaultAgent.jschanged
tests/interfaceRunner.jschanged
EVMinterface.jsView
@@ -464,9 +464,9 @@
464464 callCode (gas, addressOffset, valueOffset, dataOffset, dataLength, resultOffset, resultLength, cbIndex) {
465465 this.takeGas(40)
466466 // Load the params from mem
467467 const path = ['accounts', ...this.getMemory(addressOffset, ADDRESS_SIZE_BYTES), 'code']
468- const value = U256.fromMemory(this.getMemory(valueOffset, U128_SIZE_BYTES))
468+ const value = U256.fromBuffer(this.getMemory(valueOffset, U128_SIZE_BYTES))
469469
470470 // Special case for non-zero value; why does this exist?
471471 if (!value.isZero()) {
472472 this.takeGas(6700)
common.jsView
@@ -1,8 +1,8 @@
11 const Message = require('./message')
22
3-exports.PARENT = Symbol('parent')
4-exports.ROOT = Symbol('root')
3+exports.PARENT = 0
4+exports.ROOT = 1
55 exports.getterMessage = (name, path) => {
66 const message = new Message({
77 data: {
88 getValue: name
defaultAgent.jsView
@@ -1,7 +1,7 @@
11 exports.run = async (message, kernel) => {
22 const to = message.to[message.hops]
3- if (to) {
3+ if (to !== undefined) {
44 return kernel.send(message)
55 } else if (message.data.getValue) {
66 console.log('get value')
77 return (await kernel.state.get(message.data.getValue)).value
tests/interfaceRunner.jsView
@@ -13,9 +13,8 @@
1313
1414 const dir = `${__dirname}/interface`
1515 // get the test names
1616 let tests = fs.readdirSync(dir).filter((file) => file.endsWith('.wast'))
17-// tests = ['callValue']
1817 runTests(tests)
1918
2019 function runTests (tests) {
2120 for (let testName of tests) {

Built with git-ssb-web