From c12d8cb584cab0ce23e2638449db04d116a7ed52 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 1 Feb 2017 11:27:04 -0600 Subject: [PATCH] added predictive-fer api call --- wsapi/status.go | 15 +++++++++++++++ wsapi/wsapiV2.go | 3 +++ 2 files changed, 18 insertions(+) diff --git a/wsapi/status.go b/wsapi/status.go index e15d6cd202..563fb5956e 100644 --- a/wsapi/status.go +++ b/wsapi/status.go @@ -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 +} \ No newline at end of file diff --git a/wsapi/wsapiV2.go b/wsapi/wsapiV2.go index fe6d4a688c..813935b684 100644 --- a/wsapi/wsapiV2.go +++ b/wsapi/wsapiV2.go @@ -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