Skip to content

Commit 03e5aa7

Browse files
committed
oopsie (fix)
1 parent 9e9ddc9 commit 03e5aa7

2 files changed

Lines changed: 4 additions & 34 deletions

File tree

.yarn/patches/agoric-telemetry.patch

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,9 @@ index 1263928..59a9afc 100644
77
- START: 'cosmic-swingset-commit-start',
88
+ FINISH: 'cosmic-swingset-commit-block-finish',
99
+ START: 'cosmic-swingset-commit-block-start',
10-
@@ -101,0 +101,9 @@
11-
+/**
12-
+ * @param {Context} slogObj
13-
+ */
14-
+const serializeSlogObj = slogObj =>
15-
+ JSON.stringify(slogObj, (_, value) =>
16-
+ // eslint-disable-next-line valid-typeof
17-
+ typeof value === BigInt.name.toLowerCase() ? Number(value) : value,
18-
+ );
19-
+
20-
@@ -241,1 +241,4 @@ if (!finalBody.runNum) {
10+
@@ -232,1 +232,4 @@ if (!finalBody.runNum) {
2111
- assert(!triggerContext);
2212
+ assert(
2313
+ !triggerContext ||
2414
+ triggerContext['run.trigger.type'] === 'bootstrap',
2515
+ );
26-
@@ -282,1 +282,4 @@ if (replayContext) {
27-
- assert(finalBody.replay);
28-
+ assert(
29-
+ finalBody.replay,
30-
+ `Non-replay delivery when replay context is ${serializeSlogObj(replayContext)}`,
31-
+ );
32-
@@ -292,1 +292,5 @@ } else {
33-
- assert(!!crankContext && !finalBody.replay);
34-
+ assert(!!crankContext, 'No crank context found for current delivery');
35-
+ assert(
36-
+ !finalBody.replay,
37-
+ 'Replaying delivery without a replay context',
38-
+ );

scripts/slogger.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -445,16 +445,9 @@ export const makeSlogSender = async (options) => {
445445
* @param {Slog} slog
446446
*/
447447
const slogSender = (slog) => {
448-
try {
449-
if (!lastBlockTime) lastBlockTime = slog.time;
450-
contextualSlogProcessor(slog);
451-
// return callBacks[slog.type]?.(contextualSlogProcessor(slog));
452-
} catch (err) {
453-
console.error(
454-
`Error while processing slog '${serializeSlogObj(slog)}': `,
455-
err,
456-
);
457-
}
448+
if (!lastBlockTime) lastBlockTime = slog.time;
449+
const contextualSlog = contextualSlogProcessor(slog);
450+
return callBacks[slog.type]?.(contextualSlog);
458451
};
459452

460453
return Object.assign(slogSender, {

0 commit comments

Comments
 (0)