Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
Signed-off-by: wanderer <mjbecze@gmail.com>
  • Loading branch information
wanderer committed Mar 6, 2018
1 parent bbb47d3 commit 19b980f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
26 changes: 1 addition & 25 deletions tests/wasmContainer.js
Expand Up @@ -67,7 +67,7 @@ tape('empty', async t => {
t.plan(1)
tester = t
const expectedState = {
'/': Buffer.from('a2440f97e233b183f5e66fb6d60765311be7a2b7', 'hex')
'/': Buffer.from('bda5092c441e8d40c32eeeb69ce0e493f9d487cb', 'hex')
}

const tree = new RadixTree({
Expand Down Expand Up @@ -280,27 +280,3 @@ tape('load / store globals', async t => {
hypervisor.send(message)
})
})

tape('ben', async t => {
// t.plan(1)
tester = t
const tree = new RadixTree({
db
})

const wasm = fs.readFileSync(WASM_PATH + '.wasm')
const hypervisor = new Hypervisor(tree)
hypervisor.registerContainer(TestWasmContainer)

const {module} = await hypervisor.createActor(TestWasmContainer.typeId, wasm)

const funcRef = module.getFuncRef('#main')
funcRef.gas = 100000

const message = new Message({
funcRef
}).on('done', () => {
t.end()
})
hypervisor.send(message)
})
2 changes: 1 addition & 1 deletion wasmContainer.js
Expand Up @@ -156,7 +156,7 @@ module.exports = class WasmContainer {
},
export: (modRef, bufRef) => {
const mod = this.refs.get(modRef, 'mod')
let name = this.get8Memory(offset, length)
let name = this.refs.get(bufRef, 'buf')
name = Buffer.from(name).toString()
const funcRef = mod.getFuncRef(name)
return this.refs.add(funcRef, 'func')
Expand Down

0 comments on commit 19b980f

Please sign in to comment.