UNPKG
parsec-node
Version:
latest (2.2.2)
2.2.2
2.2.1
2.2.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.3
2.0.2
2.0.1
2.0.0
1.6.10
1.6.9
1.6.8
1.6.7
1.6.6
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.2
1.5.1
1.5.0
1.4.0
1.3.2
1.3.1
1.3.0
1.2.0
1.2.0-0
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
https://parseclabs.readthedocs.io/en/latest/
parsec-node
/
src
/
api
/
methods
/
getNodeStatus.js
13 lines
(10 loc)
•
250 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
module.exports = async (bridgeState, app) => {
const
status = await app.status();
if
(status.sync_info.catching_up) {
return
'catching-up'
; }
if
(bridgeState.checkCallsCount >
0
) {
return
'waiting-for-period'
; }
return
'ok'
; };