git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit aafe96ace826878428496f61ad0f8a93f9fccd2e

updated packages

wanderer committed on 3/22/2018, 7:33:45 PM
Parent: 4193d244fec5109d4e0c0960c30a02fccc9623c6

Files changed

index.jschanged
package-lock.jsonchanged
package.jsonchanged
tests/index.jschanged
tests/wasmContainer.jschanged
index.jsView
@@ -99,18 +99,19 @@
9999 * ticks
100100 * @param {Number} ticks the number of ticks at which to create the state root
101101 * @returns {Promise}
102102 */
103- createStateRoot () {
104- return new Promise((resolve, reject) => {
103+ async createStateRoot () {
104+ const promise = new Promise((resolve, reject) => {
105105 if (!this.scheduler._running) {
106106 this.tree.flush().then(resolve)
107107 } else {
108- this.scheduler.on('idle', () => {
108+ this.scheduler.once('idle', () => {
109109 this.tree.flush().then(resolve)
110110 })
111111 }
112112 })
113+ return promise
113114 }
114115
115116 /**
116117 * regirsters a container with the hypervisor
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 369221 bytes
New file size: 369221 bytes
package.jsonView
@@ -41,9 +41,9 @@
4141 },
4242 "devDependencies": {
4343 "levelup": "^2.0.2",
4444 "coveralls": "^3.0.0",
45- "dfinity-radix-tree": "^0.1.4",
45+ "dfinity-radix-tree": "^0.1.5",
4646 "documentation": "^6.0.0",
4747 "level-browserify": "^1.1.2",
4848 "nyc": "^11.6.0",
4949 "standard": "11.0.1",
tests/index.jsView
@@ -33,13 +33,13 @@
3333
3434 tape('basic', async t => {
3535 t.plan(2)
3636 const expectedState = {
37- '/': Buffer.from('cd80335de00c2bf38570b41c55a79174c1c64e9f', 'hex')
37+ '/': Buffer.from('1602fe14ee1e95c9d5cf10e809d0615cb21927a2', 'hex')
3838 }
3939
4040 const tree = new RadixTree({
41- db: db
41+ db
4242 })
4343
4444 class testVMContainer extends BaseContainer {
4545 main (m) {
@@ -62,13 +62,13 @@
6262
6363 tape('two communicating actors', async t => {
6464 t.plan(2)
6565 const expectedState = {
66- '/': Buffer.from('b063f3e53b2ea40f50afe964b9f9b49aad491155', 'hex')
66+ '/': Buffer.from('3cdad3b1024074e7edafadbb98ee162cc8cfe565', 'hex')
6767 }
6868
6969 const tree = new RadixTree({
70- db: db
70+ db
7171 })
7272
7373 class testVMContainerA extends BaseContainer {
7474 main (funcRef) {
@@ -108,9 +108,9 @@
108108
109109 tape('three communicating actors', async t => {
110110 t.plan(3)
111111 const expectedState = {
112- '/': Buffer.from('db532195ac569b142415cc9bdbec37f18f344a59', 'hex')
112+ '/': Buffer.from('7b659c263363b0b9c461a432aac8d8bf0d351788', 'hex')
113113 }
114114
115115 const tree = new RadixTree({
116116 db: db
@@ -161,9 +161,9 @@
161161
162162 tape('three communicating actors, with tick counting', async t => {
163163 t.plan(3)
164164 const expectedState = {
165- '/': Buffer.from('db532195ac569b142415cc9bdbec37f18f344a59', 'hex')
165+ '/': Buffer.from('7b659c263363b0b9c461a432aac8d8bf0d351788', 'hex')
166166 }
167167
168168 const tree = new RadixTree({
169169 db: db
@@ -214,9 +214,9 @@
214214
215215 tape('errors', async t => {
216216 t.plan(3)
217217 const expectedState = {
218- '/': Buffer.from('b063f3e53b2ea40f50afe964b9f9b49aad491155', 'hex')
218+ '/': Buffer.from('3cdad3b1024074e7edafadbb98ee162cc8cfe565', 'hex')
219219 }
220220
221221 const tree = new RadixTree({
222222 db: db
@@ -262,9 +262,9 @@
262262
263263 tape('actor creation', async t => {
264264 t.plan(2)
265265 const expectedState = {
266- '/': Buffer.from('8a21d80cd7ca04e64be7cb2726a72060fc546ed6', 'hex')
266+ '/': Buffer.from('f1803a4188890e205e2e6480159d504d149d8910', 'hex')
267267 }
268268
269269 const tree = new RadixTree({
270270 db: db
@@ -311,9 +311,9 @@
311311
312312 tape('simple message arbiter test', async t => {
313313 t.plan(4)
314314 const expectedState = {
315- '/': Buffer.from('b063f3e53b2ea40f50afe964b9f9b49aad491155', 'hex')
315+ '/': Buffer.from('3cdad3b1024074e7edafadbb98ee162cc8cfe565', 'hex')
316316 }
317317
318318 const tree = new RadixTree({
319319 db: db
@@ -380,9 +380,9 @@
380380 tape('arbiter test for id comparision', async t => {
381381 t.plan(4)
382382 let message
383383 const expectedState = {
384- '/': Buffer.from('db532195ac569b142415cc9bdbec37f18f344a59', 'hex')
384+ '/': Buffer.from('7b659c263363b0b9c461a432aac8d8bf0d351788', 'hex')
385385 }
386386
387387 const tree = new RadixTree({
388388 db: db
@@ -447,9 +447,9 @@
447447
448448 tape('async work', async t => {
449449 t.plan(3)
450450 const expectedState = {
451- '/': Buffer.from('b063f3e53b2ea40f50afe964b9f9b49aad491155', 'hex')
451+ '/': Buffer.from('3cdad3b1024074e7edafadbb98ee162cc8cfe565', 'hex')
452452 }
453453
454454 const tree = new RadixTree({
455455 db: db
tests/wasmContainer.jsView
@@ -68,9 +68,9 @@
6868 tape('empty', async t => {
6969 t.plan(1)
7070 tester = t
7171 const expectedState = {
72- '/': Buffer.from('bda5092c441e8d40c32eeeb69ce0e493f9d487cb', 'hex')
72+ '/': Buffer.from('3ac226eb0a4809e7f0b3d7ba1e0bb6d57e0378a8', 'hex')
7373 }
7474
7575 const tree = new RadixTree({
7676 db

Built with git-ssb-web