Skip to content

Commit

Permalink
added predictive-fer api call
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbeam committed Feb 1, 2017
1 parent 558329d commit c12d8cb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions wsapi/status.go
Expand Up @@ -67,3 +67,18 @@ func HandleNetworkInfo(
r.NetworkID = state.GetNetworkID()
return r, nil
}

func HandlePredictiveFER(
state interfaces.IState,
params interface{},
) (
interface{},
*primitives.JSONError,
) {
type ret struct {
PredictiveFER uint64
}
r := new(ret)
r.PredictiveFER = state.GetPredictiveFER()
return r, nil
}
3 changes: 3 additions & 0 deletions wsapi/wsapiV2.go
Expand Up @@ -161,6 +161,9 @@ func HandleV2Request(state interfaces.IState, j *primitives.JSON2Request) (*prim
case "network-info":
resp, jsonError = HandleNetworkInfo(state, params)
break
case "predictive-fer":
resp, jsonError = HandlePredictiveFER(state, params)
break

// END STATUS calls

Expand Down

0 comments on commit c12d8cb

Please sign in to comment.