Skip to content

Commit

Permalink
update considered maintenance window
Browse files Browse the repository at this point in the history
  • Loading branch information
Cabecinha84 committed Jan 14, 2025
1 parent 6b92228 commit 4985a57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ZelBack/src/services/fluxService.js
Original file line number Diff line number Diff line change
Expand Up @@ -1654,8 +1654,8 @@ async function streamChainPreparation(req, res) {
}

// check if it is outside maintenance window
if (fluxNodeInfo.status === 'CONFIRMED' && fluxNodeInfo.last_confirmed_height > 0 && (120 - (blockCount - fluxNodeInfo.last_confirmed_height)) < 5) {
// fluxnodes needs to confirm between 120 and 150 blocks, if it is 4 blocks remaining to enter confirmation window we already consider outside maintenance window.
if (fluxNodeInfo.status === 'CONFIRMED' && fluxNodeInfo.last_confirmed_height > 0 && (120 - (blockCount - fluxNodeInfo.last_confirmed_height)) < 8) {
// fluxnodes needs to confirm between 120 and 150 blocks, if it is 7 blocks remaining to enter confirmation window we already consider outside maintenance window, as this can take around 12 minutes.
res.statusMessage = 'Error Fluxnode is not in maintenance window.';
res.status(503).end();
return;
Expand Down

0 comments on commit 4985a57

Please sign in to comment.