Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove coin age priority and free transactions - implementation #9602

Merged
merged 13 commits into from Mar 7, 2017
2 changes: 1 addition & 1 deletion src/init.cpp
Expand Up @@ -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));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with backwards compatibility for a while but can we start to move to a better option name for this feature, and log that the old name is deprecated?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @sdaftuar . Commit at jnewbery@b83daf9 adds -printfee option. Feel free to pull into this PR if you want it, or I'll open another PR after this gets merged.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always interpreted this as print the priority as in the sort order for mining. I have no problem changing it, but I'll leave that for another PR if people want it.

}
strUsage += HelpMessageOpt("-shrinkdebugfile", _("Shrink debug.log file on client startup (default: 1 when no -debug)"));

Expand Down
6 changes: 1 addition & 5 deletions src/miner.cpp
Expand Up @@ -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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if we're changing this anyway how about we switch "fee" -> "feerate"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meh. It's pretty obvious that this is feerate from context:

2017-03-03 14:19:33 fee 0.00005913 BTC/kB txid 3bbae9e9e8299f6335b5e99912cb6717df794212477a92fb425c2b5993d3bdc7
2017-03-03 14:19:33 fee 0.00004437 BTC/kB txid a3c976f58b52b8ab29eda3c434cb21d1d3ba1d30136b329a51ba4a3f493e6adf

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed anyway

CFeeRate(iter->GetModifiedFee(), iter->GetTxSize()).ToString(),
iter->GetTx().GetHash().ToString());
}
Expand Down