More feature RPC support.

This commit is contained in:
JoelKatz
2013-05-31 16:22:38 -07:00
parent 349deba218
commit 6e220cc97e
5 changed files with 68 additions and 34 deletions

View File

@@ -2263,11 +2263,17 @@ Json::Value RPCHandler::doFeature(Json::Value jvRequest, int& cost, ScopedLock&
return jvReply;
}
if (!jvRequest.isMember("vote"))
uint256 uFeature = theApp->getFeatureTable().getFeature(jvRequest["feature"].asString());
if (uFeature.isZero())
{
// WRITEME
uFeature.SetHex(jvRequest["feature"].asString());
if (uFeature.isZero())
return rpcError(rpcBAD_FEATURE);
}
if (!jvRequest.isMember("vote"))
return theApp->getFeatureTable().getJson(uFeature);
// WRITEME
return rpcError(rpcNOT_SUPPORTED);
}