Browse Source

[debug] Change -printpriority option

-printpriority output is now changed to only show the fee rate and hash of transactions included in a block by the mining code.
0.15
Alex Morcos 8 years ago
parent
commit
400b15147c
  1. 2
      src/init.cpp
  2. 6
      src/miner.cpp

2
src/init.cpp

@ -456,7 +456,7 @@ std::string HelpMessage(HelpMessageMode mode) @@ -456,7 +456,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-printtoconsole", _("Send trace/debug info to console instead of debug.log file"));
if (showDebug)
{
strUsage += HelpMessageOpt("-printpriority", strprintf("Log transaction priority and fee per kB when mining blocks (default: %u)", DEFAULT_PRINTPRIORITY));
strUsage += HelpMessageOpt("-printpriority", strprintf("Log transaction fee per kB when mining blocks (default: %u)", DEFAULT_PRINTPRIORITY));
}
strUsage += HelpMessageOpt("-shrinkdebugfile", _("Shrink debug.log file on client startup (default: 1 when no -debug)"));

6
src/miner.cpp

@ -263,11 +263,7 @@ void BlockAssembler::AddToBlock(CTxMemPool::txiter iter) @@ -263,11 +263,7 @@ void BlockAssembler::AddToBlock(CTxMemPool::txiter iter)
bool fPrintPriority = GetBoolArg("-printpriority", DEFAULT_PRINTPRIORITY);
if (fPrintPriority) {
double dPriority = iter->GetPriority(nHeight);
CAmount dummy;
mempool.ApplyDeltas(iter->GetTx().GetHash(), dPriority, dummy);
LogPrintf("priority %.1f fee %s txid %s\n",
dPriority,
LogPrintf("fee %s txid %s\n",
CFeeRate(iter->GetModifiedFee(), iter->GetTxSize()).ToString(),
iter->GetTx().GetHash().ToString());
}

Loading…
Cancel
Save