If the prio. will be enough after the next block don't force fees. [wallet] #2129

Merged
merged 1 commit into from Jan 14, 2013

Conversation

Projects
None yet
5 participants
Member

gmaxwell commented Dec 26, 2012

If the user was really after the fastest possible confirmation times
they would be manually setting a fee. In cases where the wallet builds
a transaction with a priority that is too low to qualify as free until
the next block, go ahead without a fee. Confirmation frequently takes
multiple blocks even when a minimum fee is provided.

Contributor

gavinandresen commented Dec 26, 2012

ACK, but there should be a comment in the code explaining the +1

@gmaxwell gmaxwell If the prio. will be enough after the next block don't force fees.
  If the user was really after the fastest possible confirmation times
they would be manually setting a fee. In cases where the wallet builds
a transaction with a priority that is too low to qualify as free until
the next block, go ahead without a fee.  Confirmation frequently takes
multiple blocks even when a minimum fee is provided.
d783655

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/d7836552e64b1f949385f7b11836ece99f7c3d67 for binaries and test log.

Owner

sipa commented Jan 6, 2013

ACK

@Diapolo Diapolo commented on the diff Jan 10, 2013

src/wallet.cpp
@@ -1154,7 +1154,10 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins)
{
int64 nCredit = pcoin.first->vout[pcoin.second].nValue;
- dPriority += (double)nCredit * pcoin.first->GetDepthInMainChain();
+ //The priority after the next block (depth+1) is used instead of the current,
@Diapolo

Diapolo Jan 10, 2013

Can we keep a space after starting comments :)?

@gavinandresen gavinandresen added a commit that referenced this pull request Jan 14, 2013

@gavinandresen gavinandresen Merge pull request #2129 from gmaxwell/wallet_less_frequent_fees
If the prio. will be enough after the next block don't force fees. [wallet]
9980d11

@gavinandresen gavinandresen merged commit 9980d11 into bitcoin:master Jan 14, 2013

@laudney laudney pushed a commit to reddcoin-project/reddcoin that referenced this pull request Mar 19, 2014

@gavinandresen gavinandresen Merge pull request #2129 from gmaxwell/wallet_less_frequent_fees
If the prio. will be enough after the next block don't force fees. [wallet]
52fbb04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment