Browse Source

Make getchaintxstats less noisy in debug log

mvstuff
Duke 2 months ago
parent
commit
8ff5e4aa5e
  1. 4
      src/rpc/blockchain.cpp

4
src/rpc/blockchain.cpp

@ -1620,12 +1620,12 @@ UniValue getchaintxstats(const UniValue& params, bool fHelp, const CPubKey& mypk
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid block count: should be between 0 and the block's height - 1");
}
}
LogPrintf("%s: blockcount = %d\n", __func__, blockcount);
// LogPrintf("%s: blockcount = %d\n", __func__, blockcount);
const CBlockIndex* pindexPast = pindex->GetAncestor(pindex->GetHeight() - blockcount);
int nTimeDiff = pindex->GetMedianTimePast() - pindexPast->GetMedianTimePast();
int nTxDiff = pindex->nChainTx - pindexPast->nChainTx;
LogPrintf("%s: pindexPast.height = %d, pindex.height = %d\n", __func__, pindexPast->GetHeight(), pindex->GetHeight() );
// LogPrintf("%s: pindexPast.height = %d, pindex.height = %d\n", __func__, pindexPast->GetHeight(), pindex->GetHeight() );
UniValue ret(UniValue::VOBJ);
ret.pushKV("time", (int64_t)pindex->nTime);

Loading…
Cancel
Save