Fix rest.cpp
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||||
// Copyright (c) 2009-2014 The Bitcoin Core developers
|
// Copyright (c) 2009-2014 The Bitcoin Core developers
|
||||||
|
// Copyright (c) 2019 The Hush developers
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
@@ -279,7 +280,7 @@ static bool rest_block_notxdetails(HTTPRequest* req, const std::string& strURIPa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// A bit of a hack - dependency on a function defined in rpc/blockchain.cpp
|
// A bit of a hack - dependency on a function defined in rpc/blockchain.cpp
|
||||||
UniValue getblockchaininfo(const UniValue& params, bool fHelp);
|
UniValue getblockchaininfo(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||||
|
|
||||||
static bool rest_chaininfo(HTTPRequest* req, const std::string& strURIPart)
|
static bool rest_chaininfo(HTTPRequest* req, const std::string& strURIPart)
|
||||||
{
|
{
|
||||||
@@ -291,7 +292,7 @@ static bool rest_chaininfo(HTTPRequest* req, const std::string& strURIPart)
|
|||||||
switch (rf) {
|
switch (rf) {
|
||||||
case RF_JSON: {
|
case RF_JSON: {
|
||||||
UniValue rpcParams(UniValue::VARR);
|
UniValue rpcParams(UniValue::VARR);
|
||||||
UniValue chainInfoObject = getblockchaininfo(rpcParams, false);
|
UniValue chainInfoObject = getblockchaininfo(rpcParams, false, CPubKey());
|
||||||
string strJSON = chainInfoObject.write() + "\n";
|
string strJSON = chainInfoObject.write() + "\n";
|
||||||
req->WriteHeader("Content-Type", "application/json");
|
req->WriteHeader("Content-Type", "application/json");
|
||||||
req->WriteReply(HTTP_OK, strJSON);
|
req->WriteReply(HTTP_OK, strJSON);
|
||||||
|
|||||||
Reference in New Issue
Block a user