# Net

# net_syncInfo

Return sync status of the node

  • Parameters: none

  • Returns:

SyncInfo

  • from : string Sync start height

  • to : string Sync target height

  • current : string Current snapshot chain height

  • state : uint Sync state: 0 - not start, 1 - syncing, 2 - complete, 3 - error, 4 - cancelled

  • status : string Sync state description

  • Example:

# net_syncDetail

synchron detail

  • Parameters: none

  • Returns:

    SyncDetail

    • from : string start height
    • to : string target height
    • current : string current snapshot chain height
    • status : string synchron status description
    • tasks : array download tasks
    • Connections : array network connections to download ledger chunks
    • Chunks : array downloaded ledger chunks have been verified, wait to insert into local chain
    • Caches : array downloaded ledger chunks, but have not verified.
  • Example:

# net_nodeInfo

Return the detailed information of current Node, like peers.

  • Parameters: none

  • Returns:

NodeInfo

  • id : string Node ID

  • name : string Node name, configured in Identity field of node_config.json

  • netId : int The ID of Vite network connected

  • peerCount : int Number of peers connected

  • peers : []*PeerInfo Information of peers connected

  • Example:

PeerInfo

  • name : string Peer's name
  • height : int Current snapshot chain height
  • address : string Peer's ip address
  • createAt : string The time when this peer connected

# net_peers

the same with method net_nodeInfo