remove JSON Spirit UniValue wrapper

This commit is contained in:
Jonas Schnelli
2015-05-13 21:29:19 +02:00
parent 1f263c899e
commit 3df0411ad9
23 changed files with 234 additions and 253 deletions

View File

@@ -62,7 +62,7 @@ public:
};
extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry);
extern Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false);
extern UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false);
extern void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out, bool fIncludeHex);
static RestErr RESTERR(enum HTTPStatusCode status, string message)
@@ -221,7 +221,7 @@ static bool rest_block(AcceptedConnection* conn,
}
case RF_JSON: {
Object objBlock = blockToJSON(block, pblockindex, showTxDetails);
UniValue objBlock = blockToJSON(block, pblockindex, showTxDetails);
string strJSON = objBlock.write() + "\n";
conn->stream() << HTTPReply(HTTP_OK, strJSON, fRun) << std::flush;
return true;
@@ -266,7 +266,7 @@ static bool rest_chaininfo(AcceptedConnection* conn,
switch (rf) {
case RF_JSON: {
UniValue rpcParams(UniValue::VARR);
Value chainInfoObject = getblockchaininfo(rpcParams, false);
UniValue chainInfoObject = getblockchaininfo(rpcParams, false);
string strJSON = chainInfoObject.write() + "\n";
conn->stream() << HTTPReply(HTTP_OK, strJSON, fRun) << std::flush;
return true;