New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

validator-history-service

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validator-history-service - npm Package Compare versions

Comparing version

to
0.1.2

@@ -12,6 +12,5 @@ "use strict";

const validator_report_1 = __importDefault(require("./validator-report"));
const health_1 = __importDefault(require("./health"));
const api = express_1.Router();
api.use('/health', (_u, res) => {
res.status(200).send('success');
});
api.use('/health', health_1.default);
api.use('/network/validator_reports', daily_report_1.default);

@@ -18,0 +17,0 @@ api.use('/network/topology/nodes/:publicKey', nodes_1.handleNode);

@@ -43,3 +43,3 @@ "use strict";

}
void database_1.saveNodeWsUrl(ws.url);
void database_1.saveNodeWsUrl(ws.url, true);
connections.set(ip, ws);

@@ -70,2 +70,3 @@ subscribe(ws);

}
void database_1.saveNodeWsUrl(ws.url, false);
ws.terminate();

@@ -79,2 +80,3 @@ resolve();

}
void database_1.saveNodeWsUrl(ws.url, false);
ws.terminate();

@@ -81,0 +83,0 @@ resolve();

@@ -58,2 +58,3 @@ "use strict";

table.string('ws_url');
table.boolean('connected');
table.string('networks');

@@ -223,3 +224,3 @@ table.string('type');

*/
async function saveNodeWsUrl(url) {
async function saveNodeWsUrl(url, connected) {
const ip_match = IP_REGEX.exec(url);

@@ -233,2 +234,3 @@ if (ip_match) {

ws_url: url,
connected
})

@@ -235,0 +237,0 @@ .catch((err) => console.log(err));

{
"name": "validator-history-service",
"version": "0.1.1",
"version": "0.1.2",
"description": "Service for ingesting, aggregating, storing, and disbursing validation related data",

@@ -5,0 +5,0 @@ "main": "./build/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet