Skip to content

Commit

Permalink
fix: add timstamp to node observation data file
Browse files Browse the repository at this point in the history
  • Loading branch information
mistakia committed Feb 27, 2024
1 parent 0ca8318 commit b74376e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/generate-node-observations.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const generateNodeObservations = async () => {
})
}

await saveData('node-observations', nodes)
const timestamp = new Date().toISOString()
await saveData('node-observations', { timestamp, nodes })
const end = process.hrtime.bigint()
log(
`Generated observations for ${nodes.length} nodes in ${Number(
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-cloudflare-dns-nodes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ debug.enable('update-cloudflare-dns-nodes')

const updateCloudflareDNS = async () => {
const url = 'https://nano.community/data/node-observations.json'
const nodes = await request({ url })
const { nodes } = await request({ url })
const mappings = (await getData('representative-mappings')) || []
const rep_addresses = mappings.map((p) => p.address)

Expand Down

0 comments on commit b74376e

Please sign in to comment.