コード例 #1
0
ファイル: wsapiV2.go プロジェクト: FactomProject/factomd
func HandleV2Heights(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError) {
	h := new(HeightsResponse)

	h.DirectoryBlockHeight = int64(state.GetHighestCompletedBlock())
	h.LeaderHeight = int64(state.GetTrueLeaderHeight())
	h.EntryBlockHeight = int64(state.GetHighestCompletedBlock())
	h.EntryHeight = int64(state.GetEntryDBHeightComplete())
	h.MissingEntryCount = int64(state.GetMissingEntryCount())
	h.EntryBlockDBHeightProcessing = int64(state.GetEntryBlockDBHeightProcessing())
	h.EntryBlockDBHeightComplete = int64(state.GetEntryBlockDBHeightComplete())

	return h, nil
}