Browse Source

Fix coredump when running hush-cli during RPC warmup

pull/70/head
Duke Leto 3 years ago
parent
commit
ced3ba591d
  1. 3
      src/rpc/blockchain.cpp

3
src/rpc/blockchain.cpp

@ -1567,7 +1567,6 @@ inline CBlockIndex* LookupBlockIndex(const uint256& hash)
UniValue getchaintxstats(const UniValue& params, bool fHelp, const CPubKey& mypk)
{
THROW_IF_SYNCING(HUSH_INSYNC);
if (fHelp || params.size() > 2)
throw runtime_error(
@ -1631,6 +1630,8 @@ UniValue getchaintxstats(const UniValue& params, bool fHelp, const CPubKey& mypk
+ HelpExampleRpc("getchaintxstats", "2016")
);
THROW_IF_SYNCING(HUSH_INSYNC);
const CBlockIndex* pindex;
int blockcount = 30 * 24 * 60 * 60 / Params().GetConsensus().nPowTargetSpacing; // By default: 1 month

Loading…
Cancel
Save