Skip to content

Commit

Permalink
readd inSync check
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Dec 26, 2023
1 parent abaf031 commit f0ff351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/application/checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ async function checkBlockBook(ip, port, appsname) {
const response1 = await serviceHelper.httpGetRequest(`http://${ip}:${port}/api`, 5000);
const response2 = await serviceHelper.httpGetRequest(`http://${ip}:${port}/api/v2/address/${addressList[index]}?pageSize=50`, 5000);
const currentTime = new Date().getTime();
if (response2.data.txids.length > 0 && response1.data.blockbook.bestHeight > (response1.data.backend.blocks - 100) && response1.data.blockbook.bestHeight > heightList[index] && response1.data.backend.blocks > heightList[index]) {
if (response2.data.txids.length > 0 && response1.data.blockbook.bestHeight > (response1.data.backend.blocks - 100) && response1.data.blockbook.bestHeight > heightList[index] && response1.data.backend.blocks > heightList[index] && !response1.data.inSync) {
const lastBlockTmstp = new Date(response1.data.blockbook.lastBlockTime).getTime();
const timeDifference = currentTime - lastBlockTmstp;
if (response2.data.txs <= 50 && response2.data.txids.length === response2.data.txs) {
Expand Down

0 comments on commit f0ff351

Please sign in to comment.