Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shardus/monitor-client

Package Overview
Dependencies
Maintainers
0
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shardus/monitor-client - npm Package Compare versions

Comparing version 2.8.1 to 2.8.2

2

package.json
{
"name": "@shardus/monitor-client",
"version": "2.8.1",
"version": "2.8.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "entry.js",

@@ -217,17 +217,17 @@ ;(function main() {

node.radixes = result?.radixes || []
if (this.hideFullyInSync && this.isUnexpectedOOS(node).total === 0) continue;
this.nodeLoads.push({
id: nodeId,
ip: node.nodeIpInfo.externalIp,
port: node.nodeIpInfo.externalPort,
inSync: result?.insync,
total: result?.stats.total,
good: result?.stats.good,
bad: result?.stats.bad,
radixes: result?.radixes,
stillNeedsInitialPatchPostActive: node.stillNeedsInitialPatchPostActive,
cycleFinishedSyncing: node.cycleFinishedSyncing,
recentRuntimeSync: result?.radixes.some((r) => r.recentRuntimeSync),
fullRadixArray: this.generateFullRadixArray(node),
})
if (this.hideFullyInSync && this.isUnexpectedOOS(node).total === 0) continue
this.nodeLoads.push({
id: nodeId,
ip: node.nodeIpInfo.externalIp,
port: node.nodeIpInfo.externalPort,
inSync: result?.insync,
total: result?.stats.total,
good: result?.stats.good,
bad: result?.stats.bad,
radixes: result?.radixes,
stillNeedsInitialPatchPostActive: node.stillNeedsInitialPatchPostActive,
cycleFinishedSyncing: node.cycleFinishedSyncing,
recentRuntimeSync: result?.radixes.some((r) => r.recentRuntimeSync),
fullRadixArray: this.generateFullRadixArray(node),
})
}

@@ -285,3 +285,6 @@ },

let CEUnexpectedOOSCount = 0
for (let radix of node.radixes) {
const radixes = node.radixes ?? []
for (let radix of radixes) {
if (CAndCEOnly && radix.inEdgeRange) continue

@@ -316,12 +319,23 @@ if (!radix.insync) {

generateFullRadixArray(node) {
const validRadixes = node.radixes
.map((r) => parseInt(r.radix, 16))
.filter((r) => !isNaN(r) && r < 1e6)
if (validRadixes.length === 0) {
return []
}
// Find the maximum radix value
const maxRadix = Math.max(...node.radixes.map(r => parseInt(r.radix, 16)))
const maxRadix = Math.max(...validRadixes)
// Create an array with length maxRadix + 1 (to include 0)
let fullArray = new Array(maxRadix + 1).fill(null)
for (let radix of node.radixes) {
let index = parseInt(radix.radix, 16)
fullArray[index] = radix;
if (!isNaN(index) && index <= maxRadix) {
fullArray[index] = radix
}
}
return fullArray

@@ -328,0 +342,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc