Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add inet_group to published measurements #119

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -198,6 +201,7 @@ describe('integration', () => {
const published = payload[0]
assert.strictEqual(published.spark_version, measurementRecorded.sparkVersion)
assert.strictEqual(published.cid, measurementRecorded.cid)
assert.strictEqual(published.inet_group, measurementRecorded.inetGroup)
// TODO: test other fields

// We are publishing records with invalid wallet addresses too
Expand Down