Skip to content

Commit

Permalink
fix: add inet_group to published measurements
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Bajtoš <[email protected]>
  • Loading branch information
bajtos committed Oct 25, 2023
1 parent 6f3aaa7 commit b4a39d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions spark-publish/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const publish = async ({
end_at,
byte_length,
attestation,
inet_group,
cid,
provider_address,
protocol
Expand Down
6 changes: 5 additions & 1 deletion spark-publish/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ describe('integration', () => {
endAt: new Date('2023-09-18T13:33:51.239Z'),
byteLength: 100,
attestation: 'json.sig',
inetGroup: 'MTIzNDU2Nzg',
round: 42
}

Expand All @@ -116,10 +117,11 @@ describe('integration', () => {
end_at,
byte_length,
attestation,
inet_group,
completed_at_round
)
VALUES (
$1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14
$1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15
)
`, [
measurementRecorded.sparkVersion,
Expand All @@ -135,6 +137,7 @@ describe('integration', () => {
measurementRecorded.endAt,
measurementRecorded.byteLength,
measurementRecorded.attestation,
measurementRecorded.inetGroup,
measurementRecorded.round
])

Expand Down Expand Up @@ -202,5 +205,6 @@ describe('integration', () => {

// We are publishing records with invalid wallet addresses too
assert.strictEqual(published.participant_address, 't1foobar')
assert.strictEqual(published.inet_group, measurementRecorded.inetGroup)
})
})

0 comments on commit b4a39d6

Please sign in to comment.