diff --git a/packages/programs/data/shared-log/src/index.ts b/packages/programs/data/shared-log/src/index.ts index 7a31eeea2..c4870e3cb 100644 --- a/packages/programs/data/shared-log/src/index.ts +++ b/packages/programs/data/shared-log/src/index.ts @@ -2897,7 +2897,6 @@ export class SharedLog< properties.prev && properties.prev.assignedToRangeBoundary === assignedToRangeBoundary ) { - console.log("SKIP", properties.entry.hash, properties.coordinates); return; // no change } @@ -3258,7 +3257,7 @@ export class SharedLog< replicas: minReplicas.getValue(this), }) ) { - console.error("Is leader after delete"); + logger.error("Unexpected: Is leader after delete"); } }); }, this.waitForPruneDelay), diff --git a/packages/programs/data/shared-log/src/sync/rateless-iblt.ts b/packages/programs/data/shared-log/src/sync/rateless-iblt.ts index fcf6f2dae..3318f4da4 100644 --- a/packages/programs/data/shared-log/src/sync/rateless-iblt.ts +++ b/packages/programs/data/shared-log/src/sync/rateless-iblt.ts @@ -633,15 +633,14 @@ export class RatelessIBLTSynchronizer implements Syncronizer<"u64"> { messageQueue.push(newMessage); messageQueue.sort((a, b) => Number(a.seqNo - b.seqNo)); - if (messageQueue[0].seqNo != lastSeqNo + 1n) { - console.log("WAITING SEQ", messageQueue[0].seqNo, lastSeqNo + 1n); - return undefined; + if (messageQueue[0].seqNo !== lastSeqNo + 1n) { + return; } lastSeqNo++; const message = messageQueue.shift(); if (!message) { - return undefined; + return; } for (const symbol of message.symbols) { diff --git a/packages/programs/data/shared-log/src/sync/simple.ts b/packages/programs/data/shared-log/src/sync/simple.ts index 81968872f..ca6d4a835 100644 --- a/packages/programs/data/shared-log/src/sync/simple.ts +++ b/packages/programs/data/shared-log/src/sync/simple.ts @@ -332,7 +332,6 @@ export class SimpleSyncronizer // cleanup "old" missing syncs for (const [hash, { timestamp }] of map) { if (timestamp < nowMin10s) { - console.log("DELETE HASH", hash); map.delete(hash); } } diff --git a/packages/programs/data/shared-log/test/utils.ts b/packages/programs/data/shared-log/test/utils.ts index 0cf24c5df..7cd16b6f9 100644 --- a/packages/programs/data/shared-log/test/utils.ts +++ b/packages/programs/data/shared-log/test/utils.ts @@ -257,7 +257,7 @@ export const checkReplicas = async ( dbs.map( (x) => [...(x.log._gidPeersHistory.get(gid) || [])].filter( - (id) => id != x.log.node.identity.publicKey.hashcode(), + (id) => id !== x.log.node.identity.publicKey.hashcode(), ).length || 0, ) + ". Has? " +