git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit d5f11e6d921e2a42a96198931568fd1a11bad148

actorID -> actorId

Norton Wang committed on 5/9/2018, 4:42:03 PM
Parent: 7c49768cb5203906b5e068c95f34fb506223c75f

Files changed

README.mdchanged
package-lock.jsonchanged
package.jsonchanged
scheduler.jschanged
tests/index.jschanged
README.mdView
@@ -3,9 +3,9 @@
33 [![NPM Package](https://img.shields.io/npm/v/primea-hypervisor.svg?style=flat-square)](https://www.npmjs.org/package/primea-hypervisor)
44 [![Build Status](https://img.shields.io/travis/primea/js-primea-hypervisor.svg?branch=master&style=flat-square)](https://travis-ci.org/primea/js-primea-hypervisor)
55 [![Coverage Status](https://img.shields.io/coveralls/primea/js-primea-hypervisor.svg?style=flat-square)](https://coveralls.io/r/primea/js-primea-hypervisor)
66
7-[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
7 +[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
88
99 A JavaScript Implementation of Primea HyperVisor
1010
1111 # INSTALL
@@ -34,9 +34,9 @@
3434 // create message to send to the actor that was just created
3535 const message = new Message({
3636 funcRef: module.getFuncRef('main'),
3737 funcArguments: [new FunctionRef({
38- actorID: egress.id,
38 + actorId: egress.id,
3939 params: ['data']
4040 })]
4141 }).on('execution:error', e => console.error(e))
4242
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 348847 bytes
New file size: 348845 bytes
package.jsonView
@@ -31,9 +31,9 @@
3131 "dependencies": {
3232 "binary-search-insert": "^1.0.3",
3333 "debug": "^3.1.0",
3434 "events": "^2.0.0",
35- "primea-objects": "0.0.11",
35 + "primea-objects": "0.1.0",
3636 "safe-buffer": "^5.1.2"
3737 },
3838 "devDependencies": {
3939 "coveralls": "^3.0.1",
scheduler.jsView
@@ -45,12 +45,12 @@
4545 this.emit('idle')
4646 }
4747
4848 async _processMessage (message) {
49- const to = message.funcRef.actorID.toString()
49 + const to = message.funcRef.actorId.toString()
5050 let actor = this.actors.get(to) || this.drivers.get(to)
5151 if (!actor) {
52- actor = await this.hypervisor.loadActor(message.funcRef.actorID)
52 + actor = await this.hypervisor.loadActor(message.funcRef.actorId)
5353 this.actors.set(to, actor)
5454 }
5555 return actor.runMessage(message)
5656 }
tests/index.jsView
@@ -79,9 +79,9 @@
7979 })
8080
8181 tape('basic', async t => {
8282 // t.plan(2)
83- const expectedState = Buffer.from('757b51d7da3195f9bb9d211c8fd382fc526b31e6', 'hex')
83 + const expectedState = Buffer.from('efb2101f2748e73a8ea1601096792e357f4b637d', 'hex')
8484 const tree = new RadixTree({
8585 db
8686 })
8787
@@ -109,9 +109,9 @@
109109 })
110110
111111 tape('two communicating actors', async t => {
112112 t.plan(2)
113- const expectedState = Buffer.from('dc389dcfe9350e2fd0a570ca4e0c9dba801dc7ca', 'hex')
113 + const expectedState = Buffer.from('390c2dfd34e74b3850c6efd26d8eddaa2d9c5630', 'hex')
114114
115115 const tree = new RadixTree({
116116 db
117117 })
@@ -156,9 +156,9 @@
156156 })
157157
158158 tape('three communicating actors', async t => {
159159 t.plan(3)
160- const expectedState = Buffer.from('916a9ce593fdd553723118ca82d11caa28b76e99', 'hex')
160 + const expectedState = Buffer.from('07e1993d9069410aed847bb0c709def821f13bb5', 'hex')
161161 const tree = new RadixTree({
162162 db: db
163163 })
164164
@@ -206,9 +206,9 @@
206206 })
207207
208208 tape('three communicating actors, with tick counting', async t => {
209209 t.plan(3)
210- const expectedState = Buffer.from('916a9ce593fdd553723118ca82d11caa28b76e99', 'hex')
210 + const expectedState = Buffer.from('07e1993d9069410aed847bb0c709def821f13bb5', 'hex')
211211 const tree = new RadixTree({
212212 db
213213 })
214214
@@ -261,9 +261,9 @@
261261 })
262262
263263 tape('errors', async t => {
264264 t.plan(3)
265- const expectedState = Buffer.from('dc389dcfe9350e2fd0a570ca4e0c9dba801dc7ca', 'hex')
265 + const expectedState = Buffer.from('390c2dfd34e74b3850c6efd26d8eddaa2d9c5630', 'hex')
266266 const tree = new RadixTree({
267267 db
268268 })
269269
@@ -359,9 +359,9 @@
359359 })
360360
361361 tape('actor creation', async t => {
362362 t.plan(2)
363- const expectedState = Buffer.from('aa0089210c2ee081f299c84a31b55898e4aad339', 'hex')
363 + const expectedState = Buffer.from('1382a414f4d0d261eba13c238339e8e803bdbf61', 'hex')
364364
365365 const tree = new RadixTree({
366366 db
367367 })
@@ -372,9 +372,9 @@
372372 const message = new Message({
373373 funcRef: actor.getFuncRef('main'),
374374 funcArguments: [{
375375 identifier: [0, 'main'],
376- actorID: this.actor.id
376 + actorId: this.actor.id
377377 }]
378378 })
379379 this.actor.send(message)
380380 }
@@ -404,9 +404,9 @@
404404 })
405405
406406 tape('simple message arbiter test', async t => {
407407 t.plan(4)
408- const expectedState = Buffer.from('dc389dcfe9350e2fd0a570ca4e0c9dba801dc7ca', 'hex')
408 + const expectedState = Buffer.from('390c2dfd34e74b3850c6efd26d8eddaa2d9c5630', 'hex')
409409 const tree = new RadixTree({
410410 db
411411 })
412412
@@ -472,9 +472,9 @@
472472
473473 tape('arbiter test for id comparision', async t => {
474474 t.plan(5)
475475 let message
476- const expectedState = Buffer.from('916a9ce593fdd553723118ca82d11caa28b76e99', 'hex')
476 + const expectedState = Buffer.from('07e1993d9069410aed847bb0c709def821f13bb5', 'hex')
477477
478478 const tree = new RadixTree({
479479 db: db
480480 })
@@ -540,9 +540,9 @@
540540 })
541541
542542 tape('async work', async t => {
543543 t.plan(3)
544- const expectedState = Buffer.from('dc389dcfe9350e2fd0a570ca4e0c9dba801dc7ca', 'hex')
544 + const expectedState = Buffer.from('390c2dfd34e74b3850c6efd26d8eddaa2d9c5630', 'hex')
545545
546546 const tree = new RadixTree({
547547 db
548548 })
@@ -628,9 +628,9 @@
628628 const actor = hypervisor.newActor(testVMContainer)
629629
630630 const message = new Message({
631631 funcRef: actor.getFuncRef('main'),
632- funcArguments: [new FunctionRef({actorID: egress.id})]
632 + funcArguments: [new FunctionRef({actorId: egress.id})]
633633 })
634634
635635 hypervisor.send(message)
636636 })

Built with git-ssb-web