diff --git a/lib/evaluate.js b/lib/evaluate.js index 9e881e5..4ce4e81 100644 --- a/lib/evaluate.js +++ b/lib/evaluate.js @@ -199,7 +199,6 @@ export const evaluate = async ({ await updatePublicStats({ createPgClient, committees, - honestMeasurements: measurementsToReward, allMeasurements: measurements, findDealClients: (minerId, cid) => sparkRoundDetails.retrievalTasks .find(t => t.cid === cid && t.minerId === minerId)?.clients diff --git a/lib/public-stats.js b/lib/public-stats.js index 44bb7dc..d1a49d6 100644 --- a/lib/public-stats.js +++ b/lib/public-stats.js @@ -13,11 +13,10 @@ const debug = createDebug('spark:public-stats') * @param {object} args * @param {import('./typings.js').CreatePgClient} args.createPgClient * @param {Iterable} args.committees - * @param {import('./preprocess.js').Measurement[]} args.honestMeasurements * @param {import('./preprocess.js').Measurement[]} args.allMeasurements * @param {(minerId: string, cid: string) => (string[] | undefined)} args.findDealClients */ -export const updatePublicStats = async ({ createPgClient, committees, honestMeasurements, allMeasurements, findDealClients }) => { +export const updatePublicStats = async ({ createPgClient, committees, allMeasurements, findDealClients }) => { const stats = providerRetrievalResultStats.build(committees) const pgClient = await createPgClient() try { diff --git a/test/platform-stats.test.js b/test/platform-stats.test.js index 64968ba..b16ecfe 100644 --- a/test/platform-stats.test.js +++ b/test/platform-stats.test.js @@ -280,12 +280,12 @@ describe('platform-stats', () => { describe('daily_participants', () => { it('submits daily_participants data for today', async () => { /** @type {Measurement[]} */ - const honestMeasurements = [ + const allMeasurements = [ { ...VALID_MEASUREMENT, participantAddress: '0x10' }, { ...VALID_MEASUREMENT, participantAddress: '0x10' }, { ...VALID_MEASUREMENT, participantAddress: '0x20' } ] - await updatePlatformStats(pgClient, honestMeasurements) + await updatePlatformStats(pgClient, allMeasurements) const { rows } = await pgClient.query( 'SELECT day::TEXT, participant_id FROM daily_participants' diff --git a/test/public-stats.test.js b/test/public-stats.test.js index 2fb635f..04bee8a 100644 --- a/test/public-stats.test.js +++ b/test/public-stats.test.js @@ -58,7 +58,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients: (_minerId, _cid) => ['f0client'] }) @@ -75,7 +74,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients: (_minerId, _cid) => ['f0client'] }) @@ -101,7 +99,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients: (_minerId, _cid) => ['f0client'] }) @@ -119,7 +116,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients: (_minerId, _cid) => ['f0client'] }) @@ -146,7 +142,6 @@ describe('public-stats', () => { createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients: (_minerId, _cid) => ['f0client'] }) @@ -165,7 +160,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients: (_minerId, _cid) => ['f0client'] }) @@ -207,7 +201,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients: (_minerId, _cid) => ['f0client'] }) @@ -235,7 +228,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients: (_minerId, _cid) => ['f0client'] }) @@ -257,7 +249,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients: (_minerId, _cid) => ['f0client'] }) @@ -287,7 +278,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients: (_minerId, _cid) => ['f0client'] }) @@ -310,7 +300,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients: (_minerId, _cid) => ['f0client'] }) @@ -343,7 +332,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients }) @@ -369,7 +357,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients }) @@ -422,7 +409,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients }) @@ -461,7 +447,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients }) @@ -508,7 +493,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients }) @@ -544,7 +528,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients }) @@ -571,7 +554,6 @@ describe('public-stats', () => { await updatePublicStats({ createPgClient, committees, - honestMeasurements, allMeasurements, findDealClients })