Skip to content

Commit

Permalink
fixup(cosmic-swingset): Fix types in launch-chain.js
Browse files Browse the repository at this point in the history
refs: #10883
  • Loading branch information
siarhei-agoric committed Jan 27, 2025
1 parent 4ccc546 commit 1cb9440
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/cosmic-swingset/src/launch-chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import { computronCounter } from './computron-counter.js';
/** @import { BlockInfo } from '@agoric/internal/src/chain-utils.js' */
/** @import { Mailbox, RunPolicy, SwingSetConfig } from '@agoric/swingset-vat' */
/** @import { KVStore, BufferedKVStore } from './helpers/bufferedStorage.js' */
/** @import { Counter } from '@opentelemetry/api/build/src/metrics/Metric' */

/** @typedef {ReturnType<typeof makeQueue<{context: any, action: any}>>} InboundQueue */

Expand Down Expand Up @@ -415,10 +416,10 @@ export async function launch({
const metricMeter = metricsProvider.getMeter('ag-chain-cosmos');

// Define the action types and their corresponding metric names dynamically
/** @type {Record<QueuedActionType, Counter>} */
/** @type {Record<ActionType.QueuedActionType, Counter>} */
const actionMetrics = Object.fromEntries(
Object.keys(QueuedActionType).map(actionType => [
QueuedActionType[actionType],
Object.keys(ActionType.QueuedActionType).map(actionType => [
ActionType.QueuedActionType[actionType],
metricMeter.createCounter(`action_${actionType.toLowerCase()}_total`, {
description: `Total number of ${actionType} actions`,
}),
Expand Down

0 comments on commit 1cb9440

Please sign in to comment.