Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeepee committed Oct 10, 2023
1 parent b2237bc commit 931c191
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions bootstrap-languages/p-diff-sync/linksAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ export class LinkAdapter implements LinkSyncAdapter {
if (broadcast_payload.reference.parents) {
broadcast_payload.reference.parents = broadcast_payload.reference.parents.map( (parent: Buffer) => parent ? Buffer.from(parent).toString('base64') : 'null');
};
console.log("sync(); sending referenceh hash", broadcast_payload.reference_hash);
console.log("sync(); sending broadcast payload");
console.log(JSON.stringify(broadcast_payload));
// console.log("sync(); sending referenceh hash", broadcast_payload.reference_hash);
// console.log("sync(); sending broadcast payload");
// console.log(JSON.stringify(broadcast_payload));
this.socket.emit("broadcast", {roomId: this.languageName, signal: broadcast_payload});
}
} catch (e) {
Expand Down Expand Up @@ -242,15 +242,15 @@ export class LinkAdapter implements LinkSyncAdapter {
this.myCurrentRevision = res;
}
let broadcast_payload = await this.hcDna.call(DNA_NICK, ZOME_NAME, "get_broadcast_payload", null);
console.log('commit got broadcast payload', broadcast_payload.referencence_hash);
console.log("which has type", typeof broadcast_payload.reference_hash);
// console.log('commit got broadcast payload', broadcast_payload.referencence_hash);
// console.log("which has type", typeof broadcast_payload.reference_hash);
if (broadcast_payload) {
broadcast_payload.reference_hash = Buffer.from(broadcast_payload.reference_hash).toString('base64');
broadcast_payload.reference.diff = Buffer.from(broadcast_payload.reference.diff).toString('base64');
if (broadcast_payload.reference.parents) {
broadcast_payload.reference.parents = broadcast_payload.reference.parents.map( (parent: Buffer) => parent ? Buffer.from(parent).toString('base64') : 'null');
};
console.log("commit sending referenceh hash", broadcast_payload.reference_hash);
//console.log("commit sending referenceh hash", broadcast_payload.reference_hash);
this.socket.emit("broadcast", {roomId: this.languageName, signal: broadcast_payload});
}
return res as string;
Expand Down Expand Up @@ -302,13 +302,13 @@ export class LinkAdapter implements LinkSyncAdapter {

//console.log("PerspectiveDiffSync.handleHolochainSignal: Got lock");
//const parsed = JSON.parse(reference_hash);
console.log("Handle holochain signal parsed ref hash");
console.log(JSON.stringify({
diff,
reference_hash,
reference,
broadcast_author
}));
// console.log("Handle holochain signal parsed ref hash");
// console.log(JSON.stringify({
// diff,
// reference_hash,
// reference,
// broadcast_author
// }));
if (!Buffer.isBuffer(reference_hash)) {
reference_hash = Buffer.from(reference_hash, 'base64');
}
Expand Down
2 changes: 1 addition & 1 deletion cli/seed_proto.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"meta": {
"name": "perspectiveDiffSync",
"description": "Holochain based Perspective link sharing language",
"description": "Holochain based Perspective link sharing language, with revision signals sent with socket.io",
"sourceCodeLink": "https://github.com/perspect3vism/perspective-diff-sync",
"possibleTemplateParams": ["uid", "name", "description"]
},
Expand Down

0 comments on commit 931c191

Please sign in to comment.