Make sure that handlers always return Json::objectValue.

This commit is contained in:
Tom Ritchford
2014-12-01 15:26:59 -05:00
parent b0d47ebcc6
commit 86df482842
22 changed files with 43 additions and 32 deletions

View File

@@ -40,6 +40,11 @@ static const int LEDGER_VALIDATED = -3;
//
// In the absence of the "ledger_hash" or "ledger_index" parameters, the code
// assumes that "ledger_index" has the value "current".
//
// Returns a Json::objectValue. If there was an error, it will be in that
// return value. Otherwise, the object contains the field "validated" and
// optionally the fields "ledger_hash", "ledger_index" and
// "ledger_current_index", if they are defined.
Json::Value lookupLedger (
Json::Value const& params,
Ledger::pointer& ledger,