Browse Source

Fix rest.cpp

pull/51/head
Duke Leto 5 years ago
parent
commit
9e19480cc1
  1. 5
      src/rest.cpp

5
src/rest.cpp

@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2019 The Hush developers
// Distributed under the MIT software license, see the accompanying
// 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
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)
{
@ -291,7 +292,7 @@ static bool rest_chaininfo(HTTPRequest* req, const std::string& strURIPart)
switch (rf) {
case RF_JSON: {
UniValue rpcParams(UniValue::VARR);
UniValue chainInfoObject = getblockchaininfo(rpcParams, false);
UniValue chainInfoObject = getblockchaininfo(rpcParams, false, CPubKey());
string strJSON = chainInfoObject.write() + "\n";
req->WriteHeader("Content-Type", "application/json");
req->WriteReply(HTTP_OK, strJSON);

Loading…
Cancel
Save