MCPcopy Create free account
hub / github.com/DNAProject/DNA / GetSyncStatus

Function GetSyncStatus

http/base/common/common.go:486–503  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

484}
485
486func GetSyncStatus() (SyncStatus, error) {
487 var status SyncStatus
488 height, err := bactor.GetMaxPeerBlockHeight()
489 if err != nil {
490 return status, err
491 }
492 cnt, err := bactor.GetConnectionCnt()
493 if err != nil {
494 return status, err
495 }
496 curBlockHeight := bactor.GetCurrentBlockHeight()
497
498 return SyncStatus{
499 CurrentBlockHeight: curBlockHeight,
500 ConnectCount: cnt,
501 MaxPeerBlockHeight: height,
502 }, nil
503}

Callers

nothing calls this directly

Calls 3

GetMaxPeerBlockHeightMethod · 0.65
GetConnectionCntMethod · 0.65
GetCurrentBlockHeightMethod · 0.65

Tested by

no test coverage detected