git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 8219bd66a439d14f4728e4a0195f4c017c42ab90

only increment global nonce when no id is provided

Signed-off-by: wanderer <mjbecze@gmail.com>
wanderer committed on 11/26/2017, 8:04:24 PM
Parent: e1300d130bf43108644745c15e32b3573369fc84

Files changed

index.jschanged
index.jsView
@@ -67,11 +67,10 @@
6767 * @param {Integer} type - the type id for the container
6868 * @param {Object} message - an intial [message](https://github.com/primea/js-primea-message) to send newly created actor
6969 * @param {Object} id - the id for the actor
7070 */
71- async createActor (type, message, id = {nonce: this.nonce, parent: null}) {
71+ async createActor (type, message, id = {nonce: this.nonce++, parent: null}) {
7272 const encoded = encodedID(id)
73- this.nonce++
7473 const idHash = await this._getHashFromObj(encoded)
7574 const state = {
7675 nonce: 0,
7776 caps: {},

Built with git-ssb-web