mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
remove JSON Spirit UniValue wrapper
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user