ontio / ontology

Official Go implementation of the Ontology protocol. https://dev-docs.ont.io/#/
GNU Lesser General Public License v3.0
829 stars 290 forks source link

how can I get the standart node sync status? #1366

Closed gitloverr closed 3 years ago

gitloverr commented 3 years ago

hi everyone,

I would like to get the my standart node sync status over rpc api or cli... I couldn't see any method in ontology document.

how can I do this?

thank you

lucas7788 commented 3 years ago

hi everyone,

I would like to get the my standart node sync status over rpc api or cli... I couldn't see any method in ontology document.

how can I do this?

thank you

this is the ontology cli doc, https://github.com/ontio/ontology/blob/master/docs/specifications/cli_user_guide.md

laizy commented 3 years ago

@gitloverr you can get the current synced block number by get_blk_height

gitloverr commented 3 years ago

no I would like to get only synced or not information for node. @lucas7788 , the document isn't include this.

laizy commented 3 years ago

@gitloverr you can use /api/v1/node/syncstatus restful api for this. it will return the current synced block height and the max block height of remote peers.