Skip to content

Commit e049344

Browse files
committed
Let's watch the network converse.
1 parent bdbcc81 commit e049344

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ <h1>time between each block</h1>
418418
setInterval(function() {
419419
if (play && DELAY_RUN.net) {
420420
DELAY_RUN.net._run(amt);
421-
VISUALIZER.rehash();
421+
VISUALIZER.rehash(DELAY_RUN.net.now);
422422
$("#elapsed").html((DELAY_RUN.net.now / 1000).toFixed(2) + " seconds")
423423
}
424424
}, 10);

network.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function NodeMessageEvent(from, nid, name, obj) {
8989
this.delay = latency(from, nid);
9090

9191
this.run = function(network) {
92-
//network.setLinkActivity(from, nid)
92+
network.setLinkActivity(from, nid)
9393

9494
network.nodes[nid].handle(from, name, obj)
9595
}

sim.js

+2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ client.init(function() {
100100

101101
mapMasters[self.id].num++;
102102
mapMasters[self.id].last = b.h;
103+
104+
signedByPrev[b.prev] = true;
103105
} else {
104106
// ship off an unsignedblock to get it signed by the master
105107
self.inventory.createObj("unsignedblock", {id:"unsigned_" + b.id, b:b})

0 commit comments

Comments
 (0)