adamant-api
Advanced tools
Comparing version 0.0.4 to 0.0.5
const request = require('sync-request'); | ||
const log = require('../helpers/log'); | ||
const healthCheck = require('../helpers/healthCheck'); | ||
module.exports = (nodes) => { | ||
module.exports = (hotNode) => { | ||
let hotNode=healthCheck(nodes); | ||
return (type, input) => { | ||
return (type, input) => { | ||
let endpoint = false, | ||
@@ -11,0 +9,0 @@ explorer_url = false, |
@@ -11,3 +11,3 @@ const request = require('request'); | ||
checkNodes(nodes, this) | ||
},10000); | ||
},60000); | ||
@@ -23,5 +23,4 @@ return ()=>{ | ||
request | ||
.get(n) | ||
.get(n+'/api/delegates/get') | ||
.on('response', function(response) { | ||
console.log(n, response.statusCode) | ||
if (response.statusCode===200) context.hotNode=n; | ||
@@ -28,0 +27,0 @@ }); |
{ | ||
"name": "adamant-api", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "\"Rest api ADAMANT Messenger\"", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59003
603