diff --git a/scripts/generate-node-observations.mjs b/scripts/generate-node-observations.mjs index c748b86d..94172efa 100644 --- a/scripts/generate-node-observations.mjs +++ b/scripts/generate-node-observations.mjs @@ -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( diff --git a/scripts/update-cloudflare-dns-nodes.mjs b/scripts/update-cloudflare-dns-nodes.mjs index 2766bdee..706ad93d 100644 --- a/scripts/update-cloudflare-dns-nodes.mjs +++ b/scripts/update-cloudflare-dns-nodes.mjs @@ -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)